Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8050] iOS: TableViewRow - Setting a table views rows data then removing the rows caused the app to crash

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-04-04T13:55:43.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsiOS
Labelsmodule_tableview, qe-mw020912, qe-testadded, regression
ReporterMichael Pettiford
AssigneeStephen Tramer
Created2012-03-16T10:20:08.000+0000
Updated2013-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

FileDateSize
consoleoutput.txt2012-03-16T10:20:08.000+00005976
module_tableviewrow_2012-03-16-110346_Lisa-iPad.crash2012-03-16T10:20:08.000+000024614

Comments

  1. Stephen Tramer 2012-03-18

    Caused by commit [d7c83ee169f1ccdbf3e099e6e218de6f185a04ff](https://github.com/appcelerator/titanium_mobile/commit/d7c83ee169f1ccdbf3e099e6e218de6f185a04ff)
  2. Vishal Duggal 2012-03-18

    Resolved by PR 1730
  3. Dustin Hyde 2012-03-19

    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
  4. Michael Pettiford 2012-04-04

    Reopening/closing to add/remove labels
  5. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4940

JSON Source