{ "id": "163024", "key": "TIMOB-23871", "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": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-07T03:22:00.000+0000", "created": "2016-09-06T14:39:03.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-6.0.0" ], "versions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [ { "id": "52634", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "146966", "key": "TISTUD-8604", "fields": { "summary": "iOS: Update Debugger and Profiler ", "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": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2016-09-28T11:46:27.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": "When attempting to hit a breakpoint in a callback function (i.e. inside a setInterval function callback, or on a click event callback for a label), the Safari WebInspector debugger crashes the Titanium app.\r\n\r\nNote you need to set the value to try in your tiapp.xml to test.\r\n\r\nThis uses the \"provided\" JSCore engine for Titanium apps. As such, we should be able to use standard iOS tooling to debug the app, like Safari's debugger. However, the way we set up on particular object in the JS world, our code doesn't handle it. Specifically e hang a \"Kroll\" object off the global and ave it wrap a single instance of our KrollContext class in Obj-C. But all our code for handling wrapped JS objects assume it _always_ a KrollObject inside. In tis case, it's a KrollContext. So our Kroll*Property functions in KrollObject need to check for and handle this special object.", "attachment": [], "flagged": false, "summary": "iOS: Safari/WebInspector Debugger crashes app when hitting breakpoint", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 704, "state": "closed", "name": "2016 Sprint 18 SDK", "startDate": "2016-08-27T00:18:36.960Z", "endDate": "2016-09-10T00:18:00.000Z", "completeDate": "2016-09-09T20:26:13.865Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "395394", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Here's the error causing the crash:\r\n{code}\r\nSep 2 16:21:09 ChrisWilliamsMBP example[66933]: -[KrollContext objectForTiString:context:]: unrecognized selector sent to instance 0x7b393810\r\nSep 2 16:21:09 ChrisWilliamsMBP com.apple.CoreSimulator.SimDevice.DBBD80F0-74C7-422D-8366-6FA5A343413A.launchd_sim[64739] (UIKitApplication:dsg.sdfg[0xa317][66933]): Service exited due to Segmentation fault: 11\r\n{code}\r\n\r\nTo reproduce: \r\n* launch a Titanium app with use-jscore-framework set to true and run-on-main-thread. (I used the standard template and just added a click listener for the label on each tab's content)\r\n* Open Safari > Develop > Simulator > JSContext. \r\n* Set a breakpoint in a callback function (i.e. on the label click event handler or a setInterval callback). \r\n* When it hits the breakpoint, it crashes.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-06T14:40:52.000+0000", "updated": "2016-09-06T14:40:52.000+0000" }, { "id": "395469", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h4. Steps to test\r\n1. appc new --classic\r\n2. include true in in tiapp.xml\r\n3. in app.js, add an 'click' event listener to label. \r\n4. appc run -p ios\r\n5. Open Safari > Develop > Simulator > JSContext.\r\n6. *inside* the opened Webinspector->Resources select app.js and add a breakpoint in the event listener added earlier\r\n7. click on label\r\n\r\nh4. Expected Result\r\nApp will not crash and breakpoint works correctly.\r\n\r\nPRs reviewed and merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T03:21:49.000+0000", "updated": "2016-09-07T03:21:49.000+0000" }, { "id": "396699", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Following the above test steps provided and using the latest 6.0.X SDK build, the app no longer crashes when hitting a breakpoint using the Safari/WebInspector Debugger, and the breakpoint works correctly.\r\n\r\nTested On:\r\niPhone 7 10.0 Simulator\r\niPhone 6S 9.3 Simulator\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 6.0.0.v20160919141738\r\nAppc Studio: 4.8.0.201609101003\r\nAppc NPM: 4.2.8-6\t\r\nApp CLI: 6.0.0-45\r\nXcode 8.0 \r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-09-20T18:14:33.000+0000", "updated": "2016-09-20T18:14:33.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }