[TIMOB-8050] iOS: TableViewRow - Setting a table views rows data then removing the rows caused the app to crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-04T13:55:43.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | iOS |
Labels | module_tableview, qe-mw020912, qe-testadded, regression |
Reporter | Michael Pettiford |
Assignee | Stephen Tramer |
Created | 2012-03-16T10:20:08.000+0000 |
Updated | 2013-12-10T05:54:41.000+0000 |
Description
Steps to reproduce:
1. Create a default app and change the app.js code to the following:
var _window = Titanium.UI.createWindow({
title : 'test',
backgroundColor : 'white'
});
var myTableView = Ti.UI.createTableView();
var row = Ti.UI.createTableViewRow({
height : 80,
backgroundColor : '#c00',
});
myTableView.appendRow(row);
_window.add(myTableView);
_window.addEventListener('open', function() {
setTimeout(function() {
Ti.API.debug(JSON.stringify(myTableView));
var tableRows = myTableView.data[0].rows;
Ti.API.debug(JSON.stringify(tableRows));
tableRows.pop();
myTableView.data = tableRows;
}, 2000);
// two seconds after the window opens, remove the red row
});
_window.open();
2. Run the app
Actual Result:
The app crashes
*See attached console output and crash log*
Expected result:
The app removes the table view row and the table view is empty
This works in 1.8.2
Attachments
File | Date | Size |
---|---|---|
consoleoutput.txt | 2012-03-16T10:20:08.000+0000 | 5976 |
module_tableviewrow_2012-03-16-110346_Lisa-iPad.crash | 2012-03-16T10:20:08.000+0000 | 24614 |
Caused by commit [d7c83ee169f1ccdbf3e099e6e218de6f185a04ff](https://github.com/appcelerator/titanium_mobile/commit/d7c83ee169f1ccdbf3e099e6e218de6f185a04ff)
Resolved by PR 1730
Closing as Fixed. SDK: 2.0.0.v20120319003254 Studio: 2.0.0.201203182248 OS: Snow Leopard Devices Tested: iPad 4.3.5, iPhone Simulator 5.0
Reopening/closing to add/remove labels
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4940