{ "id": "162401", "key": "TIMOB-23726", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-08-25T02:13:20.000+0000", "created": "2016-08-04T00:19:53.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "needs-5_5_X-Backport", "qe-5.4.0", "regression" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T21:26:43.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": "Running an Alloy project in Debug mode to Device causes the app to hang on \"The Debugger is waiting for you to launch the app on your device\".\r\n\r\n*This is a Regression from 5.3.0.GA*\r\nThe hang does not occur on simulator.\r\nThe hang does not occur for a classic titanium mobile project.\r\nThe hang does not occur with run-on-main-thread disabled.\r\n\r\nh2. Steps to Reproduce\r\n\r\n1. Create a new Default Alloy Project.\r\n2. Add breakpoints to the project, preferably in the index.js file.\r\n3. Ensure that your iOS device and Computer are connected to the same WiFi Network.\r\n4. Run the app to an iOS device in Debug mode.\r\n\r\nh2. Actual Result\r\n\r\nDevice and Studio hangs on \"Waiting for Debugger to Connect\"\r\n\r\nh2. Expected Result\r\n\r\nDevice and Studio should not hang.", "attachment": [ { "id": "60074", "filename": "screenshot-1.png", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-17T22:08:56.000+0000", "size": 7576, "mimeType": "image/png" }, { "id": "60075", "filename": "screenshot-2.png", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-17T22:13:07.000+0000", "size": 7628, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Debugger for Alloy project hangs on Device with run-on-main-thread enabled", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "iPhone 6S (9.3.3) Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.4.0.v20160802165655\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 5.4.0-37\r\nXcode 7.3\r\nNode v4.4.7", "closedSprints": [ { "id": 695, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2016-08-13T00:00:16.620Z", "endDate": "2016-08-27T00:00:00.000Z", "completeDate": "2016-08-29T03:18:08.942Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "392364", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~htbryant] Is this with run-on-main-thread enabled or disabled? And I need to know if this is a regression. ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-04T03:03:01.000+0000", "updated": "2016-08-04T07:21:38.000+0000" }, { "id": "392440", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~cng] Edited the above description, it only occurs when run-on-main-thread is enabled. Checked for regression, 5.3.1.GA is affected but 5.3.0.GA works fine.", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-04T16:53:53.000+0000", "updated": "2016-08-04T16:53:53.000+0000" }, { "id": "392549", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Additionally, tested with run-on-main-thread enabled with 5.3.0.GA and was able to reproduce the same behaviour as that of 5.4.0", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-05T19:52:31.000+0000", "updated": "2016-08-05T19:52:31.000+0000" }, { "id": "393243", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Additional findings:\r\nThis only happens specifically in one scenario. Hangs on device with run-on-main-thread enabled.\r\nDoesn't matter if it's alloy or classic. And it doesn't happen on simulator.\r\n\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-16T05:05:51.000+0000", "updated": "2016-08-16T05:05:51.000+0000" }, { "id": "393245", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~htbryant] I can't reproduce it. with this environment:\r\nAPPC CLI 5.4.0-31\r\nTitanium SDK 5.4.0.v20160802165655\r\niPhone 6S Plus device\r\nAlloy project\r\nrun-on-main-thread true\r\n\r\nI did get it stuck once, on a classic project on device. But when i came back to revisit it, it worked again.I'm suspecting that this 'hanging' issue is unrelated to run-on-main-thread. Even when i visit the debugger code, there seems to be at no point it makes any distinguishing between device and simulator code for run-on-main-thread.\r\n\r\nCan you retry a few more times? And probably come up with an accurate matrix of combination of environments that can reproduce it consistently?\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-16T06:26:54.000+0000", "updated": "2016-08-16T06:26:54.000+0000" }, { "id": "393428", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~cng] After reinvestigating this issue, I've found a consistent pattern with the Debugger hang:\r\n!screenshot-2.png!\r\n\r\nIt seems that with run-on-main-thread set to {{TRUE}} in a 5.4.0 SDK built app, the debugger will function correctly upon a fresh build, but will hang on subsequent builds. when run-on-main-thread is set to {{FALSE}} in a 5.4.0 SDK built app, clean and subsequent builds will not hang.\r\n\r\nTested On:\r\niPhone 6S (9.3.4) Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.4.0.GA\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\r\nApp CLI: 5.4.0-31\r\nXcode 8.0 beta 6 (8S193k)\r\nNode v4.4.7\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-17T22:13:25.000+0000", "updated": "2016-08-17T22:13:25.000+0000" }, { "id": "393495", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "GRRRRR. I can't reproduce this. \r\nAPPC CLI 5.5.0-1\r\nTitanium SDK 5.4.0.v20160802165655\r\niPhone 6S Plus device\r\nAPpc NPM: 4.2.7\r\nXcode 7.3.1\r\nNode v4.2.2\r\nStudio 4.7.0.201607250649\r\n\r\nBUT. one thing i did realise was, i was able to reproduce consistently using Node 0.12.7, or was it 0.10.40. because i forgot to set it back to 4.2.2 when testing some other PRs. \r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-18T08:09:53.000+0000", "updated": "2016-08-18T08:09:53.000+0000" }, { "id": "393497", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "GRRRR. I tried again with an environment much more similar to yours:\r\niPhone 6S Plus (9.3.4) Device \r\nMac OSX El Capitan 10.11.6 \r\nTi SDK: 5.4.0.v20160802165655\r\nAppc Studio: 4.7.0.201607250649 \r\nAppc NPM: 4.2.7 \r\nApp CLI: 5.4.0-31 \r\nXcode 7.3.1\r\nNode v4.4.7\r\n\r\nAnd i run a 2nd a 3rd and it's still wooooorking.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-18T08:29:04.000+0000", "updated": "2016-08-18T08:29:04.000+0000" }, { "id": "394015", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "So after a full investigation of this issue using 5_5_X components, it was found that the debugger will hang on device with the \"Waiting for Debugger to Connect\" alert when setting a breakpoint at $.index.open(). _(or win.open() for classic)_ However once you press the \"resume\" button the alert is dismissed and debugging can continue as normal. It was determined that due to the implementation of main thread (5.4.0), there was an issue with the alert being dismissed correctly, as it was being run on an another thread.", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-24T00:30:04.000+0000", "updated": "2016-08-24T00:30:04.000+0000" }, { "id": "394335", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Since debugger works as per normal, stopping at the breakpoints, I'll be resolving this ticket as invalid. the \"Waiting for Debugger to Connect\" only stays there if the breakpoint is set at $index.open(). ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-25T02:12:55.000+0000", "updated": "2016-08-25T02:12:55.000+0000" }, { "id": "413977", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T21:26:43.000+0000", "updated": "2017-03-20T21:26:43.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }