{ "id": "80789", "key": "TIMOB-5400", "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-02-09T11:25:44.000+0000", "created": "2011-10-01T08:27:50.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "branch-5062", "crash", "tableview" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-02-09T11:25:44.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": "While performing rapid insert (and possibly delete) options of a row, the following error occurs, and the application crashes:\r\n\r\nbq. Thu Sep 29 17:18:08 unknown tiapp[19156] : *** -[NSRecursiveLock dealloc]: lock ( '(null)') deallocated while still in use\r\n\r\nIt appears from the crash log as though an imageview is being deallocated at the same time as a cell is being recycled, possibly indicating underprotection.", "attachment": [ { "id": "23119", "filename": "devlog recursive lock.txt", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-01T08:38:31.000+0000", "size": 27888, "mimeType": "text/plain" } ], "flagged": false, "summary": "NSRecursiveLock dealloced while in use / crash", "creator": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "167537", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Crash log for the bug report.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-01T08:38:31.000+0000", "updated": "2011-10-01T08:38:31.000+0000" }, { "id": "167548", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This appears to be a very ugly timing issue, where:\r\n\r\n- A cell goes into reuse, which causes a view detach of the image view, which then locks the destroy lock for the view proxy\r\n- While this is occurring on the main thread, garbage collection is occurring on the JS thread. The image view is \"forgotten\" at exactly a time allowing its JS object to become unprotected, meaning that the proxy is marked for deallocation.\r\n- GC just happens to grab up the object associated with the image view, which deallocates it while the lock is still being held onto, and zeroes out whatever value is in r5 (presumably, the address of the destroyLock object, since this is what's released to nil just before the crash). Something tries to access the r5 register, and crash.\r\n\r\nThis is why blocking insert operations on the main thread [a proposed solution] works - it prevents garbage collection from occurring at the same time as cell reuse, through scheduling shenanigans. Also explains why the issue is intermittent and difficult to reproduce outside of these particular crashes.\r\n\r\nKnowing that this is the likely cause means that a test to (possibly) reliably reproduce the issue through \"poor timing\" could be written.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-01T23:18:01.000+0000", "updated": "2011-10-01T23:18:01.000+0000" }, { "id": "172223", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce in 1.8.0.1.0555dcc. Tested in iPad Simulator, iOS 4.3/5.0. Previously this bug did appear on simulator, leading me to believe that it has been resolved.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-10T14:33:10.000+0000", "updated": "2011-11-10T14:33:10.000+0000" }, { "id": "182609", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "no way for qe to confirm, closing based on XSteven comments", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-09T11:18:14.000+0000", "updated": "2012-02-09T11:18:14.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }