{ "id": "174700", "key": "TIMOB-27753", "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": "2020-02-07T11:52:52.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-11T01:53:28.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": "We noticed random crashes during app start when migrating to SDK 9. It can be reproduced in our app thats available to the team by opening it a few times. It crashes around 3 of 10 times. Note: We already had a V8 error log in SDK 8.x that have become worse in SDK 9:\r\n{code}\r\n[ERROR] ProxyFactory: Exception thrown while creating V8 proxy.\r\n[ERROR] V8Exception: Exception occurred at undefined:0: Uncaught TypeError: object is not a constructor\r\n{code}\r\nWe can't seem to find an issue on our end since it works on both iOS and Android.", "attachment": [], "flagged": false, "summary": "Android: Random crashes on app start (SDK 9 regression)", "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": "454133", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], I can't reproduce this issue with your app.\r\n\r\nI tried running it and quitting it (by swiping it off recents list) and starting it again about 10 times on a physical Android 10.0 and Android 6.0 devices. I also tried enabling the \"Don't keep activities\" option under the Android OS' \"Developer Options\" (causes OS to destroy and recreate activities in back-stack) and it restarted just fine.\r\n\r\nThe error message suggests that the code is attempting to create an object while the V8 runtime isn't running. That's why it prints \"undefined:0\" where it should be printing \"jsFileName:lineNumber\".\r\n\r\nIf you're willing, try this. Go to the below source file. The code within the if-condition is where the error message is happening.\r\n[./android/runtime/v8/src/native/ProxyFactory.cpp#L82-L86|https://github.com/appcelerator/titanium_mobile/blob/7aad8f10fe4b46e6eed32c057af1dbf8f2c99624/android/runtime/v8/src/native/ProxyFactory.cpp#L82-L86]\r\n\r\nLet's purposely make it crash by adding the below \"badPointer\" line of code below. This will cause the app to segfault and dump a trace in the C/C++ library. This might help us isolate the cause of this issue.\r\n{code:cpp}\r\nLocal v8Proxy;\r\nMaybeLocal maybeV8Proxy = creator->NewInstance(context, 1, argv);\r\nif (!maybeV8Proxy.ToLocal(&v8Proxy)) {\r\n\tLOGE(TAG, \"Exception thrown while creating V8 proxy.\");\r\n\tV8Util::reportException(isolate, tryCatch);\r\n\tint* badPointer = nullptr; *badPointer = 1; // <- Add this line.\r\n\treturn Local();\r\n}\r\n{code}\r\n\r\nWe don't currently support debugging the C/C++ side of the SDK even on our end... yet. It's something I want to look into in the future. So, we'll have to do this the hard way at the moment.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-08T01:13:50.000+0000", "updated": "2020-02-11T01:53:28.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }