{ "id": "131742", "key": "TIMOB-17375", "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": "16570", "description": "Release 3.3.1", "name": "Release 3.3.1", "archived": true, "released": false } ], "resolution": null, "resolutiondate": null, "created": "2014-06-14T19:40:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "core", "defect" ], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-06-30T04:34:26.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "In debug mode, calling JSON.parse() on a piece of invalid json hangs the application and silently terminates the debugging session.\r\n\r\nA sample code snippet is as simple as:\r\n\r\n{code:javascript}\r\ntry {\r\n\tvar j = JSON.parse(\"{\");\r\n}\r\ncatch(e)\r\n{\r\n\tTi.API.info(\"Exception\");\r\n}\r\n{code}\r\n\r\nNo code seems to be executed after the JSON.parse() call. The debugger marks the application as terminated without reporting any error and the app on the device hangs (but does not crash).\r\n\r\nIn Release mode an exception is properly reported and execution of the app continues as expected.\r\n", "attachment": [], "flagged": false, "summary": "Android: Parsing invalid json hangs the app and crashes debugger", "creator": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.4.0.201511241829 \r\nAppc CLI NPM: 4.2.2 \r\nAppc CLI Core: 5.1.0 \r\nArrow: 1.3.22 \r\nSDK: 3.2.3 GA, 5.1.1.GA \r\nNode: v4.2.2 \r\nOS: Linux + Ubuntu 14.04, El Capitan (10.11.1) \r\nDevice: Samsung Galaxy Tab 3, Genymotion Emulator (4.4.4)", "comment": { "comments": [ { "id": "309853", "author": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Possibly related to TC-4212", "updateAuthor": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-19T15:53:27.000+0000", "updated": "2014-06-19T15:53:27.000+0000" }, { "id": "311558", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "The original reporter of this: [~s.stefanek]. Thanks for your report!", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-06-30T06:37:38.000+0000", "updated": "2014-06-30T06:37:38.000+0000" }, { "id": "315409", "author": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ah... why I'm no longer the reporter of this issue? :D", "updateAuthor": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-23T00:39:12.000+0000", "updated": "2014-07-23T00:39:12.000+0000" }, { "id": "315427", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~s.stefanek]! Sorry for the hiccup! Our system does that on ALLOY and STUDIO bugs (when moving bugs from TC). [~pinnamuri] can help us and set you as the reporter :D ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-23T04:32:02.000+0000", "updated": "2014-07-23T04:32:02.000+0000" }, { "id": "371701", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I can still reproduce this issue *only with Android* and on current GA stack.\r\n\r\n*Tested on:*\r\n\r\nAppcelerator Studio, build: 4.4.0.201511241829\r\nAppc CLI NPM: 4.2.2\r\nAppc CLI Core: 5.1.0\r\nArrow: 1.3.22\r\nSDK: 5.1.1.GA\r\nNode: v4.2.2\r\nOS: El Capitan (10.11.1)\r\nDevice: Genymotion Emulator (4.4.4)\r\n\r\n*To reproduce:*\r\n# Copy above code snippet into Alloy's index.js file e.g.:\r\n{code}\r\nfunction doClick(e) {\r\n alert($.label.text);\r\n}\r\n\r\ntry {\r\n\tvar j = JSON.parse(\"{\");\r\n}\r\ncatch(e)\r\n{\r\n\tTi.API.info(\"Exception\");\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n# Debug your app to an emulator; *do not set any breakpoints*", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-30T23:59:57.000+0000", "updated": "2015-11-30T23:59:57.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }