{ "id": "131353", "key": "TIMOB-17084", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-07-03T19:25:16.000+0000", "created": "2014-06-06T12:21:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.3.0" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38741", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "111225", "key": "TIMOB-13135", "fields": { "summary": "Android: Enable/disable tab navigation for Action Bar", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-22T23:00:53.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": "Android: ActionBar: setNavigationMode() crashes the app\r\nThis is regression.It works fine with 3.2.3.GA SDK\r\n\r\nSteps to reproduce:\r\n1. Run the app attached app TIMOB-13135.zip\r\n2. Tap on button \"open childWin(same activity)\".\r\n3. Tap on button \"show the tabs\". \r\n\r\nExpected:\r\nTabs should be shown\r\n\r\nActual:\r\nApp crashes, logs are as follows\r\n{code}\r\n[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41e88ba8)\r\n[ERROR] : TiApplication: (main) [246940,246940] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState; Titanium 3.3.0,2014/06/05 15:06,708f5ce\r\n[ERROR] : TiApplication: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n[ERROR] : TiApplication: \tat android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1354)\r\n[ERROR] : TiApplication: \tat android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1372)\r\n[ERROR] : TiApplication: \tat android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)\r\n[ERROR] : TiApplication: \tat android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)\r\n[ERROR] : TiApplication: \tat android.support.v7.app.ActionBarImplICS.commitActiveTransaction(ActionBarImplICS.java:378)\r\n[ERROR] : TiApplication: \tat android.support.v7.app.ActionBarImplICS$TabWrapper.onTabSelected(ActionBarImplICS.java:559)\r\n[ERROR] : TiApplication: \tat com.android.internal.app.ActionBarImpl.selectTab(ActionBarImpl.java:577)\r\n[ERROR] : TiApplication: \tat com.android.internal.app.ActionBarImpl.setSelectedNavigationItem(ActionBarImpl.java:363)\r\n[ERROR] : TiApplication: \tat com.android.internal.app.ActionBarImpl.setNavigationMode(ActionBarImpl.java:1196)\r\n[ERROR] : TiApplication: \tat android.support.v7.app.ActionBarImplICS.setNavigationMode(ActionBarImplICS.java:229)\r\n[ERROR] : TiApplication: \tat android.support.v7.app.ActionBarImplJB.setNavigationMode(ActionBarImplJB.java:20)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.ActionBarProxy.handlesetNavigationMode(ActionBarProxy.java:321)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.ActionBarProxy.handleMessage(ActionBarProxy.java:352)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:136)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5017)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:515)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)\r\n[ERROR] : TiApplication: \tat dalvik.system.NativeStart.main(Native Method)\r\n\r\n{code}", "attachment": [ { "id": "48692", "filename": "TIMOB-13135.zip", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-06-06T12:21:45.000+0000", "size": 6669486, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: ActionBar: setNavigationMode() crashes the app", "creator": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Tested on:\r\nDevice : Google Nexus 5, Android Version: 4.4.2\r\nSDK: 3.3.0.v20140605150555\r\nCLI version : 3.3.0-beta2\r\nOS : MAC OSX 10.9.2\r\nAlloy: 1.4.0-beta\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nLiveView: 1.0.4\r\nAppcelerator Studio, build: 3.3.0.201405271647\r\ntitanium-code-processor: 1.1.1\r\nXCode : 5.1.1", "closedSprints": [ { "id": 129, "state": "closed", "name": "To Be Scheduled", "startDate": "2016-03-28T04:03:55.142Z", "endDate": "2016-04-08T04:03:00.000Z", "completeDate": "2016-03-29T04:09:03.755Z", "originBoardId": 100 }, { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "307976", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's the test case converted to native Titanium:\r\n{code}\r\nvar actionBar = null;\r\n \r\nfunction openChild() {\r\n var win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n \r\n var button1 = Ti.UI.createButton({top: 100, title:'hide the tabs'});\r\n var button2 = Ti.UI.createButton({top: 200, title:'show the tabs'});\r\n var button3 = Ti.UI.createButton({top: 300, title:'getNavigation mode'});\r\n button1.addEventListener('click', setStandard);\r\n button2.addEventListener('click', setTabs);\r\n button3.addEventListener('click', getNavMode);\r\n \r\n win.add(button1);\r\n win.add(button2);\r\n win.add(button3);\r\n \r\n \r\n if (Ti.Platform.name === 'android') {\r\n if (actionBar) {\r\n //made sure both property and setter work :)\r\n //actionBar.setNavigationMode(0);\r\n actionBar.navigationMode = 0;\r\n }\r\n win.open();\r\n }\r\n}\r\n\r\nfunction setStandard() {\r\n if (actionBar) {\r\n actionBar.setNavigationMode(0);\r\n }\r\n}\r\n \r\nfunction setTabs() {\r\n if (actionBar) {\r\n actionBar.setNavigationMode(2);\r\n } \r\n}\r\n \r\nfunction getNavMode() {\r\n if (actionBar) {\r\n alert('The navigation mode is: ' + actionBar.getNavigationMode());\r\n }\r\n}\r\n\r\nvar myTabs = Ti.UI.createTabGroup({backgroundColor: 'white'});\r\nvar win1 = Ti.UI.createWindow({title: \"Tab 1\"});\r\nvar button1 = Ti.UI.createButton({title: \"open childWin (same activity)\", top: 70});\r\nvar button2 = Ti.UI.createButton({title: \"getNavigationMode()\", top: 200});\r\nbutton1.addEventListener('click', openChild);\r\nbutton2.addEventListener('click', getNavMode);\r\nwin1.add(button1);\r\nwin1.add(button2);\r\nvar tab1 = Ti.UI.createTab({window: win1});\r\n\r\nmyTabs.addEventListener('open', function() {\r\n if (Ti.Platform.name === 'android') {\r\n var tabGroupAct = myTabs.getActivity();\r\n actionBar = tabGroupAct.actionBar;\r\n if (actionBar){\r\n actionBar.title = \"Rock n' Roll\";\r\n }\r\n }\r\n});\r\nmyTabs.addTab(tab1);\r\nmyTabs.open();\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T07:46:03.000+0000", "updated": "2014-06-09T07:46:03.000+0000" }, { "id": "311909", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Some additional information: This error will occur with what we would in the past call a \"heavyweight\" window. In the past, heavyweight and lightweight windows could both be created - this was based on the specified options during window creation. A tiapp.xml setting was added: \"ti.android.useLegacyWindow\" which initially had a default of \"true\" which allows the use of either window type. The default for this setting was then set to \"false\", which means all windows would use the new architecture as described in TIMOB-13796. As of 3.3.0 this option is no longer available, and ALL projects will use the new architecture. Since this error occurs on what we used to call a \"heavyweight\" window, and this is now the only option, this issue will always occur with 3.3.0 or greater, but will depend on both the tiapp.xml setting and the method window creation in 3.2.3.\r\n\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-01T21:15:13.000+0000", "updated": "2014-07-01T21:15:13.000+0000" }, { "id": "312064", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "With heavyweight window, each window has it's own activity associated with it. When 'openChild' is called, a new activity is launched and the old activity is stopped by the Android OS. This will result in OS calling onSaveInstanceState on the previous activity before stopping the activity. When 'show the tabs' is clicked, it is trying to modify the state of the fragment which was already saved and stopped. Since activity is already stopped, modified state will be lost if the activity is destroyed and hence Android throws this exception. Changing the state in the same activity (setNavigationMode) works without any issue. \r\nI don't think this is a bug.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-07-02T16:07:03.000+0000", "updated": "2014-07-02T16:07:03.000+0000" }, { "id": "312291", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A simple workaround is to replace LW window with a view. You can do this by replacing the openChild() function in the above test case with:\r\n{code}\r\nfunction openChild() {\r\n var view = Ti.UI.createView({backgroundColor: 'white'});\r\n \r\n var button1 = Ti.UI.createButton({top: 100, title:'hide the tabs'});\r\n var button2 = Ti.UI.createButton({top: 200, title:'show the tabs'});\r\n var button3 = Ti.UI.createButton({top: 300, title:'getNavigation mode'});\r\n button1.addEventListener('click', setStandard);\r\n button2.addEventListener('click', setTabs);\r\n button3.addEventListener('click', getNavMode);\r\n \r\n view.add(button1);\r\n view.add(button2);\r\n view.add(button3);\r\n \r\n \r\n if (Ti.Platform.name === 'android') {\r\n if (actionBar) {\r\n //made sure both property and setter work :)\r\n //actionBar.setNavigationMode(0);\r\n actionBar.navigationMode = 0;\r\n }\r\n }\r\n win1.add(view);\r\n}\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-03T19:24:57.000+0000", "updated": "2014-07-03T19:24:57.000+0000" }, { "id": "312340", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-03T22:21:29.000+0000", "updated": "2014-07-03T22:21:29.000+0000" }, { "id": "315610", "author": { "name": "msuman49", "key": "msuman49", "displayName": "Sai Suman Mallela", "active": true, "timeZone": "America/Los_Angeles" }, "body": "What version of Release 3.4.0 is this bug fixed ??\r\n\r\nI installed the following continuous build :\r\nFRI JUL 18, 2014 2:57:13 PM\r\nversion: 3.4.0\r\ngit hash: 58198c641d77e17d156431666e80bae732b5c130\r\n\r\nStill am getting the above error.", "updateAuthor": { "name": "msuman49", "key": "msuman49", "displayName": "Sai Suman Mallela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-24T14:16:09.000+0000", "updated": "2014-07-24T14:16:09.000+0000" }, { "id": "415193", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:00:53.000+0000", "updated": "2017-03-22T23:00:53.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }