[AC-1518] iOS8: Quickly delete list view items can lead to crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-09-24T02:16:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage, core, ios, supportTeam |
Reporter | David He |
Assignee | Mauro Parra-Miranda |
Created | 2014-07-04T03:49:27.000+0000 |
Updated | 2016-03-08T07:37:58.000+0000 |
Description
To produce the error - quickly delete line item one after another and eventually crash will happen
var win = Ti.UI.currentWindow;
var listView = Ti.UI.createListView();
var sections = [];
var fruitSection = Ti.UI.createListSection({
headerTitle : 'Fruits'
});
var fruitDataSet = [{
properties : {f
title : 'Apple',
canEdit : true
}
}, {
properties : {
title : 'Banana',
canEdit : true
}
}, {
properties : {
title : 'Pineapple',
canEdit : true
}
}, {
properties : {
title : 'Kiwi Fruit',
canEdit : true
}
}, {
properties : {
title : 'Coconut',
canEdit : true
}
}, {
properties : {
title : 'Strawberry',
canEdit : true
}
}, {
properties : {
title : 'Watermelon',
canEdit : true
}
},{
properties : {
title : 'Mangosteen',
canEdit : true
}
},{
properties : {
title : 'Lychee',
canEdit : true
}
},{
properties : {
title : 'Dragonfruit',
canEdit : true
}
},{
properties : {
title : 'Mandrain',
canEdit : true
}
},{
properties : {
title : 'Orange',
canEdit : true
}
},{
properties : {
title : 'Guava',
canEdit : true
}
}];
fruitSection.setItems(fruitDataSet);
sections.push(fruitSection);
listView.sections = sections;
win.add(listView);
[ERROR] : The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
[ERROR] : Reason:
[ERROR] : *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
[ERROR] : Stack trace:
[ERROR] : 0 CoreFoundation 0x04a6c5c8 __exceptionPreprocess + 152
[ERROR] : 1 libobjc.A.dylib 0x03e018b6 objc_exception_throw + 44
[ERROR] : 2 CoreFoundation 0x04a20316 -[__NSPlaceholderArray initWithObjects:count:] + 390
[ERROR] : 3 CoreFoundation 0x04a43ce9 +[NSArray arrayWithObject:] + 73
[ERROR] : 4 testDavid 0x002b7036 -[TiUIListView tableView:commitEditingStyle:forRowAtIndexPath:] + 2166
[ERROR] : 5 UIKit 0x00904ba3 -[UITableView animateDeletionOfRowWithCell:] + 107
[ERROR] : 6 UIKit 0x00a84695 -[UITableViewCell _swipeDeleteButtonPushed] + 70
[ERROR] : 7 libobjc.A.dylib 0x03e13874 -[NSObject performSelector:withObject:withObject:] + 77
[ERROR] : 8 UIKit 0x008160c2 -[UIApplication sendAction:to:from:forEvent:] + 108
[ERROR] : 9 UIKit 0x0081604e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
[ERROR] : 10 UIKit 0x0090e0c1 -[UIControl sendAction:to:forEvent:] + 66
[ERROR] : 11 UIKit 0x0090e484 -[UIControl _sendActionsForEvents:withEvent:] + 577
[ERROR] : 12 UIKit 0x0090d733 -[UIControl touchesEnded:withEvent:] + 641
[ERROR] : 13 UIKit 0x00b88c7f _UIGestureRecognizerUpdate + 7166
[ERROR] : 14 UIKit 0x0085319a -[UIWindow _sendGesturesForEvent:] + 1291
[ERROR] : 15 UIKit 0x008540ba -[UIWindow sendEvent:] + 1030
[ERROR] : 16 UIKit 0x00827e86 -[UIApplication sendEvent:] + 242
[ERROR] : 17 UIKit 0x0081218f _UIApplicationHandleEventQueue + 11421
[ERROR] : 18 CoreFoundation 0x049f583f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
[ERROR] : 19 CoreFoundation 0x049f51cb __CFRunLoopDoSources0 + 235
[ERROR] : 20 CoreFoundation 0x04a1229e __CFRunLoopRun + 910
[ERROR] : 21 CoreFoundation 0x04a11ac3 CFRunLoopRunSpecific + 467
[ERROR] : 22 CoreFoundation 0x04a118db CFRunLoopRunInMode + 123
[ERROR] : 23 GraphicsServices 0x049c89e2 GSEventRunModal + 192
[ERROR] : 24 GraphicsServices 0x049c8809 GSEventRun + 104
[ERROR] : 25 UIKit 0x00814d3b UIApplicationMain + 1225
[ERROR] : 26 testDavid 0x00006008 main + 456
[ERROR] : 27 libdyld.dylib 0x076c0725 start + 0
[ERROR] : 2014-07-04 13:45:24.065 testDavid[43584:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
[ERROR] : *** First throw call stack:
[ERROR] : (
[ERROR] : 0 CoreFoundation 0x04a6c5e4 __exceptionPreprocess + 180
[ERROR] : 1 libobjc.A.dylib 0x03e018b6 objc_exception_throw + 44
[ERROR] : 2 CoreFoundation 0x04a20316 -[__NSPlaceholderArray initWithObjects:count:] + 390
[ERROR] : 3 CoreFoundation 0x04a43ce9 +[NSArray arrayWithObject:] + 73
[ERROR] : 4 testDavid 0x002b7036 -[TiUIListView tableView:commitEditingStyle:forRowAtIndexPath:] + 2166
[ERROR] : 5 UIKit 0x00904ba3 -[UITableView animateDeletionOfRowWithCell:] + 107
[ERROR] : 6 UIKit 0x00a84695 -[UITableViewCell _swipeDeleteButtonPushed] + 70
[ERROR] : 7 libobjc.A.dylib 0x03e13874 -[NSObject performSelector:withObject:withObject:] + 77
[ERROR] : 8 UIKit 0x008160c2 -[UIApplication sendAction:to:from:forEvent:] + 108
[ERROR] : 9 UIKit 0x0081604e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
[ERROR] : 10 UIKit 0x0090e0c1 -[UIControl sendAction:to:forEvent:] + 66
[ERROR] : 11 UIKit 0x0090e484 -[UIControl _sendActionsForEvents:withEvent:] + 577
[ERROR] : 12 UIKit 0x0090d733 -[UIControl touchesEnded:withEvent:] + 641
[ERROR] : 13 UIKit 0x00b88c7f _UIGestureRecognizerUpdate + 7166
[ERROR] : 14 UIKit 0x0085319a -[UIWindow _sendGesturesForEvent:] + 1291
[ERROR] : 15 UIKit 0x008540ba -[UIWindow sendEvent:] + 1030
[ERROR] : 16 UIKit 0x00827e86 -[UIApplication sendEvent:] + 242
[ERROR] : 17 UIKit 0x0081218f _UIApplicationHandleEventQueue + 11421
[ERROR] : 18 CoreFoundation 0x049f583f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
[ERROR] : 19 CoreFoundation 0x049f51cb __CFRunLoopDoSources0 + 235
[ERROR] : 20 CoreFoundation 0x04a1229e __CFRunLoopRun + 910
[ERROR] : 21 CoreFoundation 0x04a11ac3 CFRunLoopRunSpecific + 467
[ERROR] : 22 CoreFoundation 0x04a118db CFRunLoopRunInMode + 123
[ERROR] : 23 GraphicsServices 0x049c89e2 GSEventRunModal + 192
[ERROR] : 24 GraphicsServices 0x049c8809 GSEventRun + 104
[ERROR] : 25 UIKit 0x00814d3b UIApplicationMain + 1225
[ERROR] : 26 testDavid 0x00006008 main + 456
[ERROR] : 27 libdyld.dylib 0x076c0725 start + 0
[ERROR] : )
[ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException
-- End simulator log ---------------------------------------------------------
[INFO] : Application has exited from iOS Simulator
[INFO] : Project built successfully in 56s 437ms
This is a serious problem prevents me from submitting my app!!! Please treat it urgently and get it fixed ASAP. Thanks
Hi, Can you tell me which kind of device do you use, as I tried your code with different simulators. But can't reproduce your problem. Does this error happen when you run your simple test case or you have other code in your test case. On the other hand, would you please try to clean project, then run your app again. See if the problem still is there. Regards, Shuo
Hi Shuo Tried on iOS simulator 7.1. Try as quickly as possible to delete the line item - I can recreate this issue consistently, Code snippet is fairly enough for issue reproduction. Will try to clean the project and get back to you later Thanks
Hello, We tested this issue. We cannot reproduce this bug in latest Ti Tools.
Testing Environment:
Titanium SDK: 3.3.0.GA, Titanium CLI: 3.3.0, IOS Simulator: 7.1, OS X Version: 10.9.3, Appcelerator Studio: 3.3.0Steps to Test:
1. Create a Classic project. 2. Paste this code in app.js file. 3. Run this code with the testing environment.Thanks
Probably it has been fixed in latest SDK 3.3.0 Please close it. Thanks
I am seeing this issue now consistently with all my editable ListViews, after upgrading my iPhone to iOS 8 today. It happens when I swipe to reveal the Delete button, then tap somewhere on the list, or swipe back to hide it. Xcode device console logs hundreds of these warnings when it happens and then crashes the app: {quote}
Ed How did you test it? Use my code above? Please refer to Shuo to reopen this ticket. Thanks
Tested with latest 3.4.0.RC, working fine.