[TIMOB-17172] iOS: Crash with TableViewRow object to a TableView inside a ScrollView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-19T19:45:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.3.0, Release 3.4.0 |
Components | iOS |
Labels | ios, module_scrollView, parity, qe-testadded, regression |
Reporter | Dirlei Dionísio |
Assignee | Vishal Duggal |
Created | 2014-06-14T15:16:55.000+0000 |
Updated | 2014-06-20T19:12:11.000+0000 |
Description
I have a UI design with: ScrollView with layout='vertical', a view at height=Ti.UI.SIZE and a TableView at height=Ti.UI.SIZE and scrollable=false.
When I try to add a TableViewRow object to TableView, the app closes.
This code reproduces the problem.
var w = Titanium.UI.createWindow({
fullscreen: true,
backgroundColor: 'silver'
});
var s = Ti.UI.createScrollView({
layout: 'vertical' /* composite crash too */
});
var v = Ti.UI.createView({
height: Ti.UI.SIZE /* Ti.UI.FILL works */
});
var t = Ti.UI.createTableView({
data: [{title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}],
height: Ti.UI.SIZE,
//backgroundColor: 'white',
top: '200dp',
scrollable: false
});
v.add(t);
s.add(v);
w.add(s);
setTimeout(function () {
t.backgroundColor = 'yellow';
t.setData([{
title: 'dictionaty works'
}]);
t.appendRow({
title: 'it will appears only later'
});
setTimeout(function () {
t.backgroundColor = 'red';
t.setData([Ti.UI.createTableViewRow({
title: 'app will close'
})]);
alert('not called');
}, 2000);
}, 2000);
w.open();
HI, What is your meaning of "App closes", app exist to home page? maybe you can give me a screen shot for your problem. Regards, Shuo Liang
Exactly, the app exit to home. Note that if I change line 11 to Ti.UI.FILL, all stuff works. I suppose the bug is on Ti.UI.View resize implementation. Regards, Dirlei.
Removing regression tag unless noted otherwise.
Ingo, on Ti 3.2.3 the code above works perfectly. Thus, this is a regression issue, right?
Yes, if it does work on 3.2.3, then I will mark it as a regression.
Confirmed being not reproducible using TiSDK 3.2.3.GA Therefore is a regression. TiSDk 3.3.0.v20140613161751 Appcelerator Studio 3.3.0.201406111952 CLI 3.3.0-rc Alloy 1.4.0-rc
Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/5815 3_3_X - https://github.com/appcelerator/titanium_mobile/pull/5816 Note: The size behavior of TableView seems to be broken but that should not be considered a blocker for this PR. The behavior is broken in 3.2.3.GA as well
Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201406171619 Titanium SDK, build: 3.3.0.v20140619130123 Titanium CLI, build: 3.3.0-rc Alloy: 1.4.0-rc iOS Device: iPhone 5S (7.1.1) iOS Simulator: iPhone (7.1) Used test code provided in description, app does not crash. Closing.