Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10455] iOS: tableView row events on deleted row cause crash EXC_CRASH (SIGABRT)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 2.0.2, Release 2.1.2
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-ios082012, reprod
ReporterDustin Hyde
AssigneeUnknown
Created2012-08-15T14:00:26.000+0000
Updated2018-02-28T20:03:42.000+0000

Description

tableView row events on a row that was deleted by another TableView cause crash this is not a regression on android, the test code works without error or unexpected behavior on mobileweb, this test code works almost as expected (e.g., the row is moved to the other table correctly, without crash), however there is a mobileweb bug where the bottom row does not appear until the top table view is clicked test steps: 1. run code:
var win = Ti.UI.createWindow();

var table1 = Ti.UI.createTableView({
	top : 0,
	left : 0,
	width : '100%',
	height : '50%'
});

var row = Ti.UI.createTableViewRow({
	title : 'click top row, then bottom row'
});

table1.appendRow(row);

var table2 = Ti.UI.createTableView({
	bottom : 0,
	left : 0,
	width : '100%',
	height : '50%'
});

win.add(table1);
win.add(table2);

table1.addEventListener('click', function(e){
	table2.appendRow(e.row);
	table1.deleteRow(e.index);
});

win.open(); 
2. click on top row to make bottom row appear 3. click on bottom row actual result: crash expected result: the row should be removed from the top table view and added to the bottom table view, and clicking on the bottom row does not cause crash

Attachments

FileDateSize
console_log.txt2012-08-15T14:00:26.000+000014246
MyProject_2012-08-15-132246_QEs-iPhone.crash2012-08-15T14:00:26.000+000028409

Comments

  1. Arthur Evans 2012-08-16

    I think iOS is doing the right thing here, although it would be ideal if the exception was more useful. Attempting to add a child to two views at once -- or adding a row to two tables at once -- should result in a crash.
  2. Dustin Hyde 2012-08-16

    Can we add a runtime error?
  3. Lee Morris 2017-07-06

    I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source