{ "id": "143572", "key": "TIMOB-18464", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-03-11T07:25:44.000+0000", "created": "2015-01-27T21:39:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "alloy", "android", "crash" ], "versions": [], "issuelinks": [ { "id": "52770", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "163366", "key": "TIMOB-23938", "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": "47003", "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": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-21T22:05:41.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": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TI 3.5.0.GA\r\nMac Yosemite\r\nDevices: Samsung Galaxy S5 and Note3 (and others)", "closedSprints": [ { "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": "342639", "author": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@ingo do you need anything from me? It's an easy repro and can crash basically any app (unless you have a workaround?)", "updateAuthor": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-09T20:45:05.000+0000", "updated": "2015-02-09T20:45:05.000+0000" }, { "id": "342641", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~wpccolorblind] not yet, but we will let you know.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-09T20:53:15.000+0000", "updated": "2015-02-09T20:53:15.000+0000" }, { "id": "345610", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/6706", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-10T21:14:26.000+0000", "updated": "2015-03-10T21:14:26.000+0000" }, { "id": "349003", "author": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "body": "I have found that a similar crash happens if the app is busy building a new view when you hit the back button to exit the app. I hope the PR addresses that situation, too.", "updateAuthor": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "created": "2015-04-09T01:51:31.000+0000", "updated": "2015-04-09T01:51:31.000+0000" }, { "id": "354666", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nApp does not crash anymore.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.1.0.201505071004\r\nTi SDK : 4.1.0.v20150605164428\r\nTi CLI : 4.0.1\r\nAlloy : 1.6.0\r\nMAC Yosemite : 10.10.3\r\nAppc npm : 4.0.0\r\nAppc CLI : 4.0.2-rc2\r\nNode: v0.10.37\r\nDevice - Android 5.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-09T16:29:05.000+0000", "updated": "2015-06-09T16:29:05.000+0000" }, { "id": "355614", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Problem still seems to persist in build: \r\n*4.1.0.v20150619182147*\r\nTrying on a Physical device (OnePlus One)", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2015-06-22T09:25:19.000+0000", "updated": "2015-06-22T09:25:19.000+0000" }, { "id": "360353", "author": { "name": "zkhan@insights.com", "key": "zkhan@insights.com", "displayName": "Zishan Khan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This problem still exists on 4.1.0.\r\n\r\nTested on Nexus 6, S3 & S4.\r\n\r\nPlease re-open and review.", "updateAuthor": { "name": "zkhan@insights.com", "key": "zkhan@insights.com", "displayName": "Zishan Khan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-19T15:49:09.000+0000", "updated": "2015-08-19T15:49:09.000+0000" }, { "id": "360354", "author": { "name": "safadig", "key": "safadig", "displayName": "Ghassan", "active": true, "timeZone": "America/Havana" }, "body": "ditto", "updateAuthor": { "name": "safadig", "key": "safadig", "displayName": "Ghassan", "active": true, "timeZone": "America/Havana" }, "created": "2015-08-19T15:53:44.000+0000", "updated": "2015-08-19T15:53:44.000+0000" }, { "id": "361198", "author": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem still exist on 4.1.0\r\nTested on samsung S5\r\n\r\n\r\n[ERROR] : TiApplication: (main) [2,487] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.removeAllViews()' on a null object reference; Titanium 4.1.0,2015/07/06 11:15,d57aa7d[ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.removeAllViews()' on a null object reference\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.setStyle(TiUIActivityIndicator.java:164)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:86)\r\n[ERROR] : TiApplication: \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleHide(ActivityIndicatorProxy.java:94)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:258)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:145)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5832)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n[ERROR] : AndroidRuntime: FATAL EXCEPTION: main\r\n[ERROR] : AndroidRuntime: Process: com.test.test, PID: 12323\r\n[ERROR] : AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.removeAllViews()' on a null object reference\r\n[ERROR] : AndroidRuntime: \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.setStyle(TiUIActivityIndicator.java:164)\r\n[ERROR] : AndroidRuntime: \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:86)\r\n[ERROR] : AndroidRuntime: \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)\r\n[ERROR] : AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501)\r\n[ERROR] : AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492)\r\n[ERROR] : AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470)\r\n[ERROR] : AndroidRuntime: \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleHide(ActivityIndicatorProxy.java:94)\r\n[ERROR] : AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:258)\r\n[ERROR] : AndroidRuntime: \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67)\r\n[ERROR] : AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] : AndroidRuntime: \tat android.os.Looper.loop(Looper.java:145)\r\n[ERROR] : AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:5832)\r\n[ERROR] : AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : AndroidRuntime: \tat java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] : AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n[ERROR] : AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n", "updateAuthor": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-26T03:01:40.000+0000", "updated": "2015-08-26T03:01:40.000+0000" }, { "id": "396874", "author": { "name": "perdona", "key": "perdona", "displayName": "Caio Perdona", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Guys, it is still happening on 5.5.0.GA.\r\nWhen I press back button on android while splash screen is active, I get this crash.\r\nAndroid 5 and 6.", "updateAuthor": { "name": "perdona", "key": "perdona", "displayName": "Caio Perdona", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-21T21:34:04.000+0000", "updated": "2016-09-21T21:34:04.000+0000" }, { "id": "396882", "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\r\n\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-21T22:04:48.000+0000", "updated": "2016-09-21T22:04:48.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }