{ "id": "62193", "key": "TIMOB-1561", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-25T16:58:59.000+0000", "created": "2011-04-15T02:56:05.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [], "issuelinks": [ { "id": "19384", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-26T22:22:04.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
See this help desk ticket for reference.
\r\nThe customer reported that when an animation is running and the\r\nwindow is closed, the app crashes. I verified this is the case.\r\nAttached code shows this.
Ticket's name is misleading; this has to do with a view\ncontaining a tableview being closed while the tableview is\nundergoing an operation which changes the number of rows. This\ncauses an internal consistency problem.
I'd like to add that it only crashes when properties are defined\non the tableview, before or after creating it.
Just a note that there's a problem with the JS code that might\nbe obfuscating the real issue; the append/delete actions are\nperformed on different threads and this screws up the order of\noperations (for example a row might be attempted to be deleted\nwhich hasn't really been appended yet).
\nThere is (likely) no way for us to work around this. All table\noperations need to be performed internally on the same thread or it\nmay raise consistency errors. I'll spend more time on this issue if\nI'll be able to before the 1.5.0 release or if there's a different\nsample that demonstrates the issue which doesn't involve\ntimers.
I faced that issue and to avoid that I added a delay\n(SetTimeout) between the append/delete loops. If you try doing that\nwithout the delay it will surely crash because of the reason you\nsaid.
\nMy workaround for the current state of the issue is to replace\nthe window back button with a button that sets a variable to true\nthat will break any of the append/delete loops and then closes the\nwindow.
\nThe other way is by not adding any properties to the tableView\nand use it as it is created. No separatorStyle, no backgroundColor,\nselectedBackground, nothing. This way it is just too plain simple\nto actually use it in a more refined app but at least it won't\ncrash at all.
My app is live at the Appstore, but my back button (workaround)\nworks in 1 out 3 actions only.
\nI just can't get rid of the setTimeOuts between delete/appends\nto prevent the inconsistency issue you mentioned from happening. If\nI delete/append on a single thread, slow delete animations will\nhold it back and inconsistencies will occur crashing everything. If\nI could turn off animations this would work, but as of right now\nI've learned that it is not possible.
\nI got rid of the main SetInterval though.
Multithreading tableview/animation problem.