{ "id": "173050", "key": "TIMOB-26857", "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": null, "resolutiondate": null, "created": "2019-02-25T08:38:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "engSchedule" ], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" }, { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-12-04T19:50:15.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "We had one (always reproducible) crash that occurs everything we open a certain window. Recently we integrated Crashlytics into our Titanium app and now are finally able to catch that exception (attached). It seems like the core has an issue converting some numbers correctly:\r\n\r\n{code}\r\n0 JavaScriptCore\r\nWTFCrashWithInfo(int, char const*, char const*, int, unsigned long long, unsigned long long, unsigned long long) + 12\r\n1 JavaScriptCore\r\nJSC::JSObject::toPrimitive(JSC::ExecState*, JSC::PreferredPrimitiveType) const + 4016\r\n{code}\r\nThis can be reproduced using our app (steps as discussed).\r\n\r\nNote: This is *no* duplicate of TIMOB-26852.", "attachment": [ { "id": "66185", "filename": "crash.rtf", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-02-25T09:47:03.000+0000", "size": 4034, "mimeType": "text/rtf" }, { "id": "66186", "filename": "currencies.json", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-02-25T16:17:34.000+0000", "size": 27017, "mimeType": "application/json" } ], "flagged": false, "summary": "iOS: Crash when parsing JSON from Ti.Filesystem.File.getFile()", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "446279", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Apparently the crash was caused by JSON parsing when repeatedly calling the following code:\r\n\r\n{code}\r\nJSON.parse(Ti.Filesystem.getFile('/currencies.json').read());\r\n{code}\r\n\r\nCan be easily avoided by switching to {{require('/currencies.json');}}. However we should still check why the first version crashes after repeated calls.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-02-25T16:48:33.000+0000", "updated": "2019-02-25T16:49:51.000+0000" }, { "id": "448163", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Hans Knöchel How were you able to integrate crashlytics in titanium? I tried https://github.com/hansemannn/titanium-crashlytics and few other resources but didnt get any luck", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-03T03:42:02.000+0000", "updated": "2019-05-03T03:42:02.000+0000" }, { "id": "452013", "author": { "name": "dkjeune", "key": "dkjeune", "displayName": "dkjeune", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You can add '.text' to solve your problem \r\nJSON.parse(Ti.Filesystem.getFile('/currencies.json').read().text);", "updateAuthor": { "name": "dkjeune", "key": "dkjeune", "displayName": "dkjeune", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-12T15:07:03.000+0000", "updated": "2019-10-12T15:07:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }