{ "id": "163366", "key": "TIMOB-23938", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-06T12:14:30.000+0000", "created": "2016-09-21T22:05:40.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "alloy", "android", "crash", "qe-6.0.0" ], "versions": [], "issuelinks": [ { "id": "52770", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "143572", "key": "TIMOB-18464", "fields": { "summary": "Android: Titanium crashes if back button is hit soon enough after app launch", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52771", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "146364", "key": "TIMOB-18766", "fields": { "summary": "Android: App with TabGroup - clicking \"Back\" on splash screen causes crash.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-10-13T02:23:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Based on http://developer.appcelerator.com/question/180283/always-a-crash-race-condition-with-android-back-button\r\n\r\nSummary - If you press back fast enough during app open Titanium apps will crash. Looks like the android back event that causes the app to tear down can cause the root UI element to be null when adding the first Window of the project to it.\r\n\r\nThis happens on device for the bare minimum installs of Titanium project with or without Alloy. Easier to repro on Alloy as it takes a bit longer for the app to launch.\r\n\r\nTI 3.5.0.GA\r\nMac Yosemite\r\nSamsung Galaxy S5 and Note3 (and others)\r\n\r\n1. ti create a new android project\r\n2. cd into root of project\r\n3. alloy create\r\n4. ti build -p android -T device --device-id \r\n5. Important step: On the device (not simulator), launch app AND IMMEDIATELY start pressing back button. \r\n\r\n** Keep closing and reopening app as fast as you can if you don't see it repro the first time in step 5\r\n**** This happens when a Window is the default/first item created in the Activity as well\r\n\r\nExpected -\r\nApp closes\r\n\r\nActual - \r\nApp crashes and closes\r\n\r\nStack -\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): FATAL EXCEPTION: main\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): Process: com.test, PID: 20104\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): java.lang.NullPointerException\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat android.content.ComponentName.(ComponentName.java:77)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat android.content.Intent.(Intent.java:4445)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:127)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:88)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:415)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat android.os.Looper.loop(Looper.java:146)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat android.app.ActivityThread.main(ActivityThread.java:5678)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat java.lang.reflect.Method.invoke(Method.java:515)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)\r\n01-27 13:32:08.269: E/AndroidRuntime(20104): \tat dalvik.system.NativeStart.main(Native Method)\r\n", "attachment": [], "flagged": false, "summary": "Android: Titanium crashes if back button is hit soon enough after app launch", "creator": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "TI 3.5.0.GA\r\nMac Yosemite\r\nDevices: Samsung Galaxy S5 and Note3 (and others)", "closedSprints": [ { "id": 722, "state": "closed", "name": "2016 Sprint 20 SDK", "startDate": "2016-09-28T16:50:17.299Z", "endDate": "2016-10-12T16:50:00.000Z", "completeDate": "2016-10-10T06:17:01.016Z", "originBoardId": 114 }, { "id": 356, "state": "closed", "name": "2015 Sprint 05 SDK", "startDate": "2015-02-28T15:50:08.527Z", "endDate": "2015-03-14T00:00:00.000Z", "completeDate": "2015-03-14T13:54:50.695Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "396883", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "We are getting a lot of this error on Appcelerator APM (Crittercism) on our app running on versions built both with Ti 5.5.0.GA as with Ti 5.3.0.GA", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-21T22:06:06.000+0000", "updated": "2016-09-21T22:06:06.000+0000" }, { "id": "397231", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "As a workaround, try using empty window which would listen to \"androidback\" event, in which app would be put in background (launch intent with \"home\" category).", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-09-26T12:09:34.000+0000", "updated": "2016-09-26T12:09:34.000+0000" }, { "id": "398219", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved by: https://github.com/appcelerator/titanium_mobile/pull/8465", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-06T12:14:12.000+0000", "updated": "2016-10-06T12:14:12.000+0000" }, { "id": "398276", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, the application no longer crashes when the back button is hit quickly after app launch.\r\n\r\nTested On:\r\n\r\n{noformat}\r\nNexus 6p (7.0)\r\nNexus 5X 6.0.1\r\nMac OSX Sierra 10.12\r\nTi SDK: 6.0.0.v20161006080234\r\nAppc Studio: 4.8.0.201609292239\r\nAppc NPM: 4.2.8-7\r\nApp CLI: 6.0.0-56\r\nNode v4.4.7\r\n{noformat}\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-10-06T18:20:35.000+0000", "updated": "2016-10-06T18:20:35.000+0000" }, { "id": "429051", "author": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi can you back port it to SDK 5.5.1? thanks", "updateAuthor": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-13T02:23:12.000+0000", "updated": "2017-10-13T02:23:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }