{ "id": "161716", "key": "TIMOB-23628", "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-29T06:04:21.000+0000", "created": "2016-07-12T17:51:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "notable", "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52204", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "161787", "key": "TIMOB-23638", "fields": { "summary": "Android: Unable to debug an application with newer V8", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52312", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "161787", "key": "TIMOB-23638", "fields": { "summary": "Android: Unable to debug an application with newer V8", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52784", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "163413", "key": "TISTUD-8599", "fields": { "summary": "Converge to use the same underlying debug protocol for V8 and JSC", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "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": "2018-08-06T17:49:15.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" } ], "description": "h5.Description\r\n\r\nWhen debugging a project with run-on-main-thread enabled the breakpoints will not be hit.\r\n\r\nh5.Steps to reproduce\r\n\r\n# Create an alloy application from Studio with services disabled\r\n# Place a breakpoint in index.js on line 2\r\n# Debug the application on device\r\n# Press the 'Hello World' label\r\n# Enable hyperloop for the project by clicking the 'Enable Services' button or add {{true}} to the tiapp.xml\r\n# Debug the application\r\n# Press the 'Hello World' label\r\n\r\nh5.Actual result\r\n\r\nThe breakpoint is hit in step 4 but not in step 7\r\n\r\nh5.Expected result\r\n\r\nThe breakpoint should be hit in step 4 and 7", "attachment": [], "flagged": false, "summary": "Android: Unable to debug an application with run-on-main-thread set to true", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 10 Pro, OSX 10.11.5\r\nAppc CLI Core: 5.4.0-31\r\nAppc CLI NPM: 4.2.7\r\nTi SDK: 5.4.0.v20160712013704\r\nAppc Studio: 4.7.0.201607111053", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "390518", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Removing the 'Android' prefix/component as I encounter this on iOS as well.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-12T19:03:14.000+0000", "updated": "2016-07-12T19:03:14.000+0000" }, { "id": "390559", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~cng], Here are the findings:\r\n\r\n*iOS:*\r\n||jscore||main thread||results||\r\n|true|true|builds, but breakpoint is not hit|\r\n|false|true|*builds, can hit breakpoint*|\r\n|anything|false|project fails to build|\r\n\r\n*Android:*\r\n||jscore||main thread||results||\r\n|true|true|builds, but breakpoint is not hit|\r\n|false|true|builds, but breakpoint is not hit|\r\n|anything|false|builds, but breakpoint is not hit|\r\n", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-13T00:30:31.000+0000", "updated": "2016-07-13T00:30:41.000+0000" }, { "id": "390575", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Able to reproduce this on Android with 5.4.0v20160712013704. With hyperloop, debug doesn't work. Without hyperloop, it works.\r\n\r\n{{true}} doesn't seem to make a difference for Android.\r\n\r\nTested with Android 6.0 on Nexus 6.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-13T04:47:09.000+0000", "updated": "2016-07-13T04:48:14.000+0000" }, { "id": "390576", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~msamah]. \r\nSo it's a known matter that Hyperloop doesn't work with debugger for iOS if {{use-jscore-framework}} is set to true.\r\nBy default, it is set to false. \r\nWhat's new to me was that Hyperloop doesn't work with debugger for Android. For this release, we just need to make it known to developers that currently we have no support for hyperloop with debugger. [~bimmel] Definitely worth a mention in the Beta release notes.\r\nAnd we need to address these debugger issue soon for both Android and iOS in the next releases. \r\n[~ingo][~sdavenport][~bgrantges@appcelerator.com][~jkneen] please note.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-13T05:04:26.000+0000", "updated": "2016-07-13T05:05:30.000+0000" }, { "id": "390578", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~cwilliams] Seems like the hyperloop is causing the issue for Android. Any thoughts?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-13T06:24:03.000+0000", "updated": "2016-07-13T06:24:03.000+0000" }, { "id": "390602", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I don't believe hyperloop itself is causing the debugger to break. It's running on a single thread (which is required for hyperloop) that is causing the issue. We likely need to rewrite the debugger for Android to work on a single thread like Hans/Angel did for iOS.\r\n\r\nPlease also note that the V8 update also plays a role in that we likely need to update how we hook the debugger there.\r\n- https://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/v8/src/native/V8Runtime.cpp#L256\r\n- https://github.com/nodejs/node/blob/master/src/debug-agent.cc\r\n- http://v8.paulfryzel.com/docs/master/classv8_1_1_debug.html\r\n- https://groups.google.com/forum/#!topic/v8-users/pS5tgGXzzHY\r\n- https://chromium.googlesource.com/v8/v8/+/1e4822ffed805d9cbb2a47cc9453aef06f3dfaca/src/debug-agent.cc\r\n- http://blog.joshgav.com/node/debugging/2016/02/04/Node-Debug-Architecture.html\r\n- http://stackoverflow.com/questions/28289538/how-to-use-chrome-debugger-with-v8-on-android\r\n- https://github.com/buggerjs/bugger-v8-client/blob/master/PROTOCOL.md\r\n\r\nLong story short? Running on a single thread likely broke our debugger, so it probably needs to be rewritten. V8 moved their builtin debug agent/relay out, so we need to add an impl back in anyways.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-07-13T13:39:43.000+0000", "updated": "2016-07-13T14:37:25.000+0000" }, { "id": "392192", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This is fixed on Android with 6.0+ with the latest master build of the SDK and development build of Studio. Not sure how we want to handle this, since we likely need separate fixes for iOS and Android...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-02T13:30:04.000+0000", "updated": "2016-08-02T13:30:04.000+0000" }, { "id": "392256", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I think it is acceptable for debug in hyperloop to not work in 5.4.0 for Android and for the user to expect it to work in 6.0+", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-03T02:03:51.000+0000", "updated": "2016-08-03T08:25:30.000+0000" }, { "id": "392288", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Yes that's fine. I'll change this ticket to Android exclusive. Similarly for iOS it's unable to debug with hyperloop and jscore-framework enabled. That'll be a separate ticket.\r\nHyperloop + jscore-framework disabled works ok.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-03T08:26:26.000+0000", "updated": "2016-08-03T08:26:26.000+0000" }, { "id": "392289", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "TIMOB-23638 has fixed the debugger.\r\nCan be tested with the latest master for Ti SDK as well as latest studio https://github.com/appcelerator/titanium_studio/pull/793 which you can take from nightly builds (4.8.0.201608020921) http://preview.appcelerator.com/appc-studio/ ", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-03T08:31:17.000+0000", "updated": "2016-08-03T08:31:17.000+0000" }, { "id": "395641", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am still not able to hit the breakpoint with hyperloop enabled & with {{run-on-main-thread}} , {{true}} & {{false}}.\r\n\r\nReopening as of now.\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201609061702\r\nTi SDK : 6.0.0.v20160908065418\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.8-6\r\nAppc CLI : 6.0.0-38\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1\r\nHyperloop module: 2.0.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-09T01:13:45.000+0000", "updated": "2016-09-09T01:13:45.000+0000" }, { "id": "396241", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Well I can confirm it's broken. Not sure what changed or why yet.\r\n\r\nIn local debugging I'ms being some really weird behavior where Studio's own socket-to-socket connection internal doesn't connect up properly, and I'm stumped as to why.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-15T18:14:28.000+0000", "updated": "2016-09-15T18:14:28.000+0000" }, { "id": "396248", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Ugh, this ticket sucks. So for whatever reason the ugly-but-working code where we'd open a server socket on localhost and connect to it from separate Java threads in Studio is no longer working. I managed to abstract the code enough to move away form using sockets to using piped streams to achieve the same effect, but that's going wonky because piped streams in java use hacks to check if the reading and writing threads are alive to check if the pipe is \"broken\".\r\n\r\nSo now I'm trying to figure out how to avoid the Thread hell we have and still get the pipes to work. If not, I don't really know how to fix this without ripping apart a lot of code.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-15T19:36:43.000+0000", "updated": "2016-09-15T20:33:58.000+0000" }, { "id": "396872", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I'm finally making progress once I chucked the idea of salvaging Max's code. I'm rebuilding the debug model the hierarchy for V8 from scratch (it's the data model used by eclipse for controlling the debugger), while retaining the same API/model id so the Ui should look/feel the same as before. This is the same approach I used for the iOS/JSC debugger.\r\n\r\nAnyways, I'm still iterating on this, but I do have it connecting to the app, and setting and hitting breakpoints for now.\r\n\r\nAs part of this work, I noticed a bug in the debugger agent I created for the updated Android/V8. I'll be pushing a fix to the SDK for that as well.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-21T21:02:57.000+0000", "updated": "2016-09-21T21:02:57.000+0000" }, { "id": "397058", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Pushed some NPE fixes to studio3 repo for this:\r\ndevelopment: https://github.com/aptana/studio3/commit/2537ed0592f5cc631ee739c76c3fb8eb4e377b2a\r\nrelease: https://github.com/aptana/studio3/commit/e052be2a5c5c3982f5edcac5ae9f366379a1c9b8\r\n\r\nHere's PRs to fix a debugger bug in 6+ of the SDK:\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8428\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8429\r\n\r\nWorking on the studio PRs still...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-23T17:38:34.000+0000", "updated": "2016-09-23T17:38:34.000+0000" }, { "id": "397083", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Studio PR for 'release' branch (Studio 4.8.0/SDK 6.0.0): https://github.com/appcelerator/titanium_studio/pull/818", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-23T20:11:02.000+0000", "updated": "2016-09-23T20:11:02.000+0000" }, { "id": "397600", "author": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged into development and release branches.", "updateAuthor": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-29T06:04:13.000+0000", "updated": "2016-09-29T06:04:13.000+0000" }, { "id": "398853", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cwilliams], Does this ticket fix debugging with hyperloop enabled? or just run-on-main-thread? Its not clear from the comments.\r\nFYI, It is still failing with hyperloop enabled but works fine with no hyperloop.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-13T18:23:15.000+0000", "updated": "2016-10-13T18:23:15.000+0000" }, { "id": "398974", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~lchoudhary] As far as I know it should work with and without hyperloop, and with run-on-main-thread or not. If it's not working with hyperloop specifically, we should probably open a new ticket to investigate that (though I find it very odd that hyperloop itself would play any role whatsoever - the run-on-main-thread required to use hyperloop seems more plausible). Have you tried without hyperloop, but with run-on-main-thread?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-10-14T14:10:10.000+0000", "updated": "2016-10-14T14:10:10.000+0000" }, { "id": "398993", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cwilliams], Below are my findings,\r\n||Hyperloop|||(/)||(x)||(/)||(x)\r\n||Run on main thread|||(/)||(/)||(x)||(x)\r\n||Debugging Working?|||No||Yes||No||Yes|\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201610060953\r\nTi SDK : 6.0.0.v20161013072802\r\nTi CLI : 5.0.10\r\nAlloy : 1.9.2\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.8-7\r\nAppc CLI : 6.0.0-58\r\nNode: 4.6.0\r\nNexus 6 - Android 6.0.1\r\nEnvironment : preproduction\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-14T18:11:59.000+0000", "updated": "2016-10-14T18:16:55.000+0000" }, { "id": "398995", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Opened ticket TIMOB-24037 for specific hyperloop issue.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-14T18:25:32.000+0000", "updated": "2016-10-14T18:25:32.000+0000" }, { "id": "440087", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:15.000+0000", "updated": "2018-08-06T17:49:15.000+0000" } ], "maxResults": 25, "total": 25, "startAt": 0 } } }