{ "id": "165724", "key": "TIMOB-24367", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-24T02:16:50.000+0000", "created": "2017-02-02T01:40:16.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-6.1.0" ], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-02-24T18:42:39.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": "This issue is probably due to TIMOB-24253.\r\n\r\nh5.Steps to reproduce:\r\n1. Use the code below in your app.js.\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue'\r\n});\r\n\r\nvar lbl = Ti.UI.createLabel({text: 'I am a blue window.'});\r\n\r\nlbl.addEventListener('click', function(){\r\n\tTi.UI.createWindow().open();\t\r\n});\r\n\r\nwin1.add(lbl);\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red'\r\n});\r\n\r\nwin2.add(Ti.UI.createLabel({text: 'I am a red window.'}));\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n window: win1,\r\n title: 'Blue'\r\n}),\r\ntab2 = Ti.UI.createTab({\r\n window: win2,\r\n title: 'Red'\r\n}),\r\ntabGroup = Ti.UI.createTabGroup({\r\n tabs: [tab1, tab2]\r\n});\r\ntabGroup.open();\r\n{code}\r\n\r\n2. Build for android device/emulator.\r\n3. After the app launches click on {{I am blue window}} label.\r\n4. A new window opens up.\r\n5. Hit the android back button to close the window to return to the tab group.\r\n\r\nh5.Actual results:\r\n1. The app crashes with error:\r\n{code}\r\n[ERROR] : TiApplication: (main) [8300,8300] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.timob24253/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object ti.modules.titanium.ui.TabGroupProxy.getProperty(java.lang.String)' on a null object reference; Titanium 6.1.0,2017/01/31 13:23,undefined\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.timob24253/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object ti.modules.titanium.ui.TabGroupProxy.getProperty(java.lang.String)' on a null object reference\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.-wrap11(ActivityThread.java)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:148)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5417)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object ti.modules.titanium.ui.TabGroupProxy.getProperty(java.lang.String)' on a null object reference\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTabGroup.addTab(TiUIActionBarTabGroup.java:338)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:396)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.TabGroupProxy.windowCreated(TabGroupProxy.java:371)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:559)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:673)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21)\r\n[ERROR] : TiApplication: \tat android.app.Activity.performCreate(Activity.java:6251)\r\n[ERROR] : TiApplication: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)\r\n[ERROR] : TiApplication: \t... 9 more\r\n{code}\r\n\r\nh5. Expected results:\r\n1. We should be able to return to the tabgroup with out a crash.", "attachment": [], "flagged": false, "summary": "Android: Going back to the tabgroup with android back button crashes app with \"java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object ti.modules.titanium.ui.TabGroupProxy.getProperty(java.lang.String)\"", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appc Studio : 4.8.1.201612050850\r\nSDK Version : 6.1.0.v20170131132207\r\nMac OS Version : 10.12.2\r\nXcode Version : Xcode 8.2.1 Build version 8C1002\r\nAppc CLI AND Appc NPM : {\"NPM\":\"4.2.9-1\",\"CLI\":\"6.1.0\"}\r\nTi CLI : 5.0.11\r\nAlloy : 1.9.5\r\nNode : v4.6.0\r\nNexus 6 running 6.0.1", "closedSprints": [ { "id": 839, "state": "closed", "name": "2017 Sprint 04 SDK", "startDate": "2017-02-12T23:36:00.961Z", "endDate": "2017-02-26T23:36:00.000Z", "completeDate": "2017-02-26T17:38:54.172Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "406619", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~gmathews], One more weird thing is I see the issue only on Nexus 6 - 6.0.1. \r\nTried it on Google pixel - 7.1.1, Nexus 5 - 6.0.1 & emulator - 6.0 & I could not reproduce it.\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-08T19:37:22.000+0000", "updated": "2017-02-08T19:37:22.000+0000" }, { "id": "406725", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8822", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-09T11:31:42.000+0000", "updated": "2017-02-09T11:31:42.000+0000" }, { "id": "407977", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can verify this fix. Tested with the following environment; \r\nAndroid 7.1.1 (Nexus 6P)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.1.0.v20170223182720\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-24T18:42:29.000+0000", "updated": "2017-02-24T18:42:29.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }