{ "id": "173813", "key": "TIMOB-27188", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-07-02T22:09:22.000+0000", "created": "2019-06-26T21:28:59.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TabGroup", "android", "engSchedule", "regression", "tab", "title" ], "versions": [ { "id": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-07-02T22:09:22.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": "*Summary:*\r\nAs of Titanium 8.0.2, setting up a {{TabGroup}} tab without setting the \"title\" property will cause a crash. This happens to both the top and bottom tab styles.\r\n\r\n*Use-Case:*\r\nApps which want to show icon-only tab groups.\r\n\r\n*Steps to reproduce:*\r\n# Create a Classic \"Default Project\".\r\n# Set up the project to build with Titanium 8.0.2.GA.\r\n# Replace the project's \"app.js\" with the code below.\r\n# Build and run on Android\r\n\r\n{code:javascript}\r\nfunction createTab(title) {\r\n\tvar window = Ti.UI.createWindow({ title: title });\r\n\twindow.add(Ti.UI.createLabel({ text: title + \" View\" }));\r\n\tvar tab = Ti.UI.createTab({\r\n// Setting \"title\" property to empty string works-around the problem.\r\n//\t\ttitle: \"\",\r\n\t\ticon: \"/assets/images/tab1.png\",\r\n\t\twindow: window,\r\n\t});\r\n\treturn tab;\r\n}\r\n\r\nvar tabGroupSettings = {\r\n\ttabs: [createTab(\"Tab 1\"), createTab(\"Tab 2\"), createTab(\"Tab 3\")],\r\n};\r\nif (Ti.Android) {\r\n//\ttabGroupSettings.style = Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION;\r\n}\r\nvar tabGroup = Ti.UI.createTabGroup(tabGroupSettings);\r\ntabGroup.open();\r\n{code}\r\n\r\n*Result:*\r\nApp crashes with the following stack trace when using the top bar style.\r\n{code}\r\n[ERROR] : TiExceptionHandler: (main) [122,122] Unable to start activity ComponentInfo{com.appcelerator.testing/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup.updateTabTitle(TiUITabLayoutTabGroup.java:222)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup.addTabItemInController(TiUITabLayoutTabGroup.java:155)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup.addTab(TiUIAbstractTabGroup.java:241)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:448)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.onWindowActivityCreated(TabGroupProxy.java:430)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:752)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)\r\n[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7144)\r\n[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7135)\r\n[ERROR] : TiExceptionHandler: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2894)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3049)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1809)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106)\r\n[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6680)\r\n[ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)\r\n{code}\r\n\r\nWhen using the bottom tab style, it crashes with the following stack trace...\r\n{code:javascript}\r\n[ERROR] : TiExceptionHandler: (main) [114,114] Unable to start activity ComponentInfo{com.appcelerator.testing/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigationTabGroup.updateTabTitle(TiUIBottomNavigationTabGroup.java:262)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigationTabGroup.updateDrawablesAfterNewItem(TiUIBottomNavigationTabGroup.java:162)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigationTabGroup.addTabItemInController(TiUIBottomNavigationTabGroup.java:150)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup.addTab(TiUIAbstractTabGroup.java:241)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:448)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.onWindowActivityCreated(TabGroupProxy.java:430)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:752)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)\r\n[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7144)\r\n[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7135)\r\n[ERROR] : TiExceptionHandler: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2894)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3049)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1809)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106)\r\n[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6680)\r\n[ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)\r\n{code}\r\n\r\n*Work-around:*\r\nSet tab title to empty string like this...\r\n{code:javascript}\r\nvar tab = Ti.UI.createTab({\r\n\ttitle: \"\", // <- This works-around issue.\r\n\ticon: \"/assets/images/tab1.png\",\r\n\twindow: window,\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: TabGroup crashes if tab \"title\" property is not set as of 8.0.2", "creator": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1149, "state": "closed", "name": "2019 Sprint 14", "startDate": "2019-07-01T16:55:04.813Z", "endDate": "2019-07-14T16:55:00.000Z", "completeDate": "2019-07-15T15:41:02.311Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "449387", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue.\r\nIt happens because the tabs are missing titles.\r\n\r\nYou can work-around it by setting the titles to empty strings like this...\r\n\r\n{code:javascript}\r\nvar tab1 = Ti.UI.createTab({\r\n\ttitle: \"\",\r\n\twindow: window1\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n\ttitle: \"\",\r\n\twindow: window2\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T00:34:54.000+0000", "updated": "2019-06-27T00:35:17.000+0000" }, { "id": "449389", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11001", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T04:03:32.000+0000", "updated": "2019-06-27T04:03:32.000+0000" }, { "id": "449390", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "thanks :)", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T06:32:13.000+0000", "updated": "2019-06-27T06:32:13.000+0000" }, { "id": "449422", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for reporting this [~andreas.pingas].\r\nWe've added a unit test to help make sure this issue never happens again.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T19:09:56.000+0000", "updated": "2019-06-27T19:09:56.000+0000" }, { "id": "449423", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (8.1.x): https://github.com/appcelerator/titanium_mobile/pull/11004", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T19:10:08.000+0000", "updated": "2019-06-27T19:10:08.000+0000" }, { "id": "449427", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.Waiting on Jenkins", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-06-27T21:27:21.000+0000", "updated": "2019-06-27T21:27:21.000+0000" }, { "id": "449508", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to 8_1_X, waiting on build against master to merge that PR...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-07-01T15:13:23.000+0000", "updated": "2019-07-01T15:13:23.000+0000" }, { "id": "449574", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on sdk 8.2.0.v20190702112137 and 8.1.0.v20190702104421. no crashes seen .Works as expected.Closing\r\n\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.14.5\r\n Architecture = 64bit\r\n # CPUs = 12\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 10.13.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.2.0.v20190702112137 and 8.1.0.v20190702104421\r\nDevice =Oneplus 5t android 9,Samsung s5 android 6\r\nEmulator = PIXEL android 9.\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-07-02T22:09:17.000+0000", "updated": "2019-07-02T22:09:17.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }