{ "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\n

The 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.

{html}", "attachment": [ { "id": "18020", "filename": "resources-2.zip", "author": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:05.000+0000", "size": 140419, "mimeType": "application/zip" }, { "id": "18021", "filename": "resources-9.zip", "author": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:06.000+0000", "size": 140345, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Running animation and closing a window causes a crash sdk 1.4 iOS 4", "creator": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126046", "author": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Here is the link\nto the help desk ticket

{html}", "updateAuthor": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:06.000+0000", "updated": "2011-04-15T02:56:06.000+0000" }, { "id": "126047", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:06.000+0000", "updated": "2011-04-15T02:56:06.000+0000" }, { "id": "126048", "author": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I'd like to add that it only crashes when properties are defined\non the tableview, before or after creating it.

{html}", "updateAuthor": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:06.000+0000", "updated": "2011-04-15T02:56:06.000+0000" }, { "id": "126049", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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).

\n

There 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.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:06.000+0000", "updated": "2011-04-15T02:56:06.000+0000" }, { "id": "126050", "author": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

\n

My 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.

\n

The 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.

{html}", "updateAuthor": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:07.000+0000", "updated": "2011-04-15T02:56:07.000+0000" }, { "id": "126051", "author": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

My app is live at the Appstore, but my back button (workaround)\nworks in 1 out 3 actions only.

\n

I 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.

\n

I got rid of the main SetInterval though.

{html}", "updateAuthor": { "name": "caioiglesias", "key": "caioiglesias", "displayName": "Caio Iglesias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:07.000+0000", "updated": "2011-04-15T02:56:07.000+0000" }, { "id": "126052", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Multithreading tableview/animation problem.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:07.000+0000", "updated": "2011-04-15T02:56:07.000+0000" }, { "id": "181576", "author": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Well. I ran the test on SDK 1.8 and now I only get a warning:\r\n[WARN] Table view was not in place before insertRowBefore was called. (Tell Blain or Steve to fix it!)\r\n\r\nBut it won't crash the app. I guess you have indirectly fixed it.", "updateAuthor": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-02-03T08:52:17.000+0000", "updated": "2012-02-03T08:52:17.000+0000" }, { "id": "182045", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Do you have a small set of sample code that demonstrates the issue?", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-06T10:54:59.000+0000", "updated": "2012-02-06T10:54:59.000+0000" }, { "id": "182046", "author": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "it's already attached to this issue.", "updateAuthor": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-02-06T10:58:37.000+0000", "updated": "2012-02-06T10:58:37.000+0000" }, { "id": "209466", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce in SDK 2.2.0.f9e938d on iPhone Sim 5.1. Likely fixed as part of a slew of other tableview issues.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-25T16:58:59.000+0000", "updated": "2012-07-25T16:58:59.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }