{ "id": "172901", "key": "TIMOB-26759", "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-01-21T14:00:54.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-01-23T22:12:27.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": "If an Android app is killed and relaunches, it stucks on the splash-screen. This can be seen on SDK 8+ by provocating a runtime error. ", "attachment": [], "flagged": false, "summary": "Android: If an app is killed and relaunches, it stucks on the splash-screen (SDK 8+)", "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": "445538", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm not sure what you mean.\r\n\r\nAre you talking about the error dialog Titanium displays when a JavaScript exception occurs? Is that the \"Kill\" button you are referring to? Because that will simply terminate the app. When you start up the app afterwards, it'll start up fine because it's a cold start.\r\n\r\nAnd I can kill the app via Android's task manager and restart the app just fine too. This works fine because it's doing a cold start too.\r\n\r\nPerhaps you are referring to tapping the exception dialog's \"Continue\" button? If you do that, then you may be continuing the app's JavaScript or Java side is in a broken state.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-23T03:02:02.000+0000", "updated": "2019-01-23T03:02:02.000+0000" }, { "id": "445539", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Side Note:*\r\nThe only thing I know that will cause the splash to hang on startup is if a Java exception occurs within the {{Application.onCreate()}} or {{Activity.onCreate()}} methods, because that'll put Google activity UI in a broken state. This typically only happens if there is an issue with a Java module.\r\n\r\nFor example, the \"ti.facebook\" module will throw an exception on app startup if you haven't added your app ID to the \"AndroidManifest.xml\" and \"strings.xml\". This exception occurs within Facebook's library (they did it on purpose and works like a C/C++ assert).", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-23T03:05:20.000+0000", "updated": "2019-01-23T03:05:20.000+0000" }, { "id": "445564", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for jumping on this Josh! I don't remember which exception caused this, but it can be in some kind of Window \"open\" event. Since it's development only, it's not really a blocker, so we can lower the prio here.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-23T17:05:05.000+0000", "updated": "2019-01-23T17:05:05.000+0000" }, { "id": "445594", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The error handling can definitely be made better. I think it's great that we now display a stack trace error dialog. That was a huge improvement. But right, it can still be made better.\r\n\r\nTitanium just needs a try/catch block in the right places in our {{onCreate()}} methods to better catch exceptions and handle it more gracefully. Because since the app's UI is in a broken state, we're unable to show an error dialog. You have to look at the log instead. This is what you're seeing, right?\r\n\r\nThe only error handling we can't handle gracefully are things that are loaded by the Android OS. Such as an activity or service in your AndroidManifest.xml that doesn't exist in Java. Things like that we're kind of screwed on, but it's no worse than it is for Android devs that go full native either.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-23T22:12:27.000+0000", "updated": "2019-01-23T22:12:27.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }