[TIMOB-10455] iOS: tableView row events on deleted row cause crash EXC_CRASH (SIGABRT)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 2.0.2, Release 2.1.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, qe-ios082012, reprod |
Reporter | Dustin Hyde |
Assignee | Unknown |
Created | 2012-08-15T14:00:26.000+0000 |
Updated | 2018-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
File | Date | Size |
---|---|---|
console_log.txt | 2012-08-15T14:00:26.000+0000 | 14246 |
MyProject_2012-08-15-132246_QEs-iPhone.crash | 2012-08-15T14:00:26.000+0000 | 28409 |
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.
Can we add a runtime error?
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