[TIMOB-6368] iOS: Setting headers outside of table view row creation crashes the app
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-26T17:59:02.000+0000 |
Affected Version/s | Release 1.7.5, Release 1.8.0, Release 1.8.0.1 |
Fix Version/s | Release 1.7.6, Release 1.8.0.1, Sprint 2012-02, Release 2.0.0, Release 1.8.1 |
Components | iOS |
Labels | module_tableviewrow, qe-ios012312, qe-testadded, regression |
Reporter | Qing Gao |
Assignee | Vishal Duggal |
Created | 2011-11-29T17:31:04.000+0000 |
Updated | 2013-12-10T05:53:26.000+0000 |
Description
If we are trying to add a large number of rows into a tableview and set the header for each row, that will crash the app.
Repro Steps
Step 1. Create an application based on the following code. Step 2. Run the app and a crash will be happened. Step 2. If you comment out the line "row.header='A'", the app won't crash.
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
//
// create base UI tab and root window
//
var win = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var table = Titanium.UI.createTableView({});
win.add(table);
win.open();
var addrow = function(){
var row = Ti.UI.createTableViewRow({
height:65
});
var photo = Ti.UI.createImageView({
// image: ,
top: 12,
left: 9,
width: 40,
height: 40,
clickName: 'photo'
});
row.add(photo);
var photo2 = Ti.UI.createImageView({
// image: ,
top: 12,
left: 9,
width: 40,
height: 40,
clickName: 'photo2'
});
row.add(photo2);
row.header='A';
table.appendRow(row);
}
for(var i = 0; i<3000; i++){
addrow();
Ti.API.info(Ti.Platform.availableMemory);
}
Associated Helpdesk Tickdet:
http://support-admin.appcelerator.com/display/APP-654533Attachments
File | Date | Size |
---|---|---|
app.js | 2011-12-01T10:05:48.000+0000 | 4892 |
ios sim 5 log.txt | 2012-01-26T16:40:46.000+0000 | 4129 |
rowheadercrash_2011-11-29-171307_qgaombp.crash | 2011-11-29T17:46:28.000+0000 | 39189 |
Pull pending #798
Use this file to reproduce the crash
Will resolved-fixed once there is a fix in 1.7.6.
Pull 802 up for the 1_7_X branch
Closing bug. Verified fix on: SDK build: 1.8.0.1.v20111205164258 OS: Mac OS X Lion Devices: ipod 4.0.2, iphone 5.0.1, ipad2 4.3.5. iOS Simulator (4.3)
Added label qe-testadded.
Reopening as Valid. Regression. SDK: 1.8.1.v20120125154634 Studio: 1.0.8.201201210622 OS: Lion Devices Tested: iPhone Simulator 5.0 Log Attached.
Tested with 1.8.1.v20120126191634 on iphone simulator 5.0 and iphone 4s 5.0.1
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4940