{ "id": "161922", "key": "TIMOB-23672", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": null, "resolutiondate": null, "created": "2016-07-21T20:42:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-09-22T15:11:12.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" }, { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" } ], "description": "*Details:* Currently with Android Hyperloop, if you try to stringify an object instance, a {{Uncaught RangeError: Maximum call stack size exceeded}} runtime error is thrown. This is expected, but the returned error message looks like this:\r\n{code}\r\n[ERROR] TiExceptionHandler: (main) [9945,9945] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [0,9945] - In ti:/titanium.js:0,0\r\n[ERROR] TiExceptionHandler: (main) [0,9945] - Message: Uncaught RangeError: Maximum call stack size exceeded\r\n[ERROR] TiExceptionHandler: (main) [0,9945] - Source: (function (exports, require, module, __filename, __dirname, Titanium, Ti, glob\r\n[ERROR] V8Exception: Exception occurred at ti:/titanium.js:0: Uncaught RangeError: Maximum call stack size exceeded\r\n[ERROR] V8Exception: RangeError: Maximum call stack size exceeded\r\n{code}\r\n\r\nOn iOS, if you stringify an object instance, you will get back a meaningful error message:\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] column = 35;\r\n[ERROR] line = 14;\r\n[ERROR] message = \"JSON.stringify cannot serialize cyclic structures.\";\r\n[ERROR] sourceURL = \"file:///Users/wilson_san/Library/Developer/CoreSimulator/Devices/E0D90275-BCED-43E8-9A05-36D3BBF73A52/data/Containers/Bundle/Application/F53BA1D6-12DA-4D52-A229-D1CDA2B87800/monkey23198.app/alloy/controllers/index.js\";\r\n[ERROR] stack = \"stringify@[native code]\\ndoClick@file:///Users/wilson_san/Library/Developer/CoreSimulator/Devices/E0D90275-BCED-43E8-9A05-36D3BBF73A52/data/Containers/Bundle/Application/F53BA1D6-12DA-4D52-A229-D1CDA2B87800/monkey23198.app/alloy/controllers/index.js:14:35\";\r\n[ERROR] } \r\n[ERROR] 2016-07-21 13:14:36.120 monkey23198[38836:3930678] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior ()\r\n[TRACE] [monkey23198] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior ()\r\n[ERROR] \r\n{code}\r\n\r\n*Steps to reproduce:*\r\n# Create a Hylperloop enabled project: {{appc new}}\r\n# In the index.js, replace the code with this:\r\n{code}\r\nvar String = require('java.lang.String');\r\n\r\nfunction doClick(e) {\r\n alert($.label.text);\r\n var empty = new String();\r\n console.log(JSON.stringify(empty));\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n# Install the app to an Android device/emulator: {{appc run -p android}}\r\n\r\n*Actual:* A {{RangeError: Maximum call stack size exceeded}} runtime error is thrown; see above for stack trace.\r\n\r\n*Expected:* A meaningful message should appear for Android, similar to iOS.", "attachment": [], "flagged": false, "summary": "Android: Hyperloop - A meaningful error message should appear If you try to stringify an object instance", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.4.0-33\r\nArrow: 1.8.2\r\nSDK: 5.4.0.v20160720201924\r\nHyperloop: 1.2.3\r\nNode: v4.4.7\r\nOS: Mac OS X (10.11.5)\r\nDevices: Samsung Galaxy S5 (4.4.2), Genymotion Emulator (5.1.0)", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }