{ "id": "173440", "key": "TIMOB-26964", "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": "20432", "name": "Release 8.0.1", "archived": false, "released": true, "releaseDate": "2019-05-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-04-29T14:36:54.000+0000", "created": "2019-04-04T18:51:21.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "TabGroup", "android", "close", "engSchedule" ], "versions": [], "issuelinks": [ { "id": "57502", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "173482", "key": "AC-6216", "fields": { "summary": "Android: Issue after a long time of inactivity", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-29T14:36:55.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\nIf Android \"Developer Options\" setting \"Don't keep activities\" is enabled, then calling the {{close()}} method on a child window which navigates back to a {{TabGroup}} will do the following depending on the Titanium version:\r\n* +8.0.0 and above+: Shows a blank window.\r\n* +7.2.1 < 8.0.0+: Causes a crash.\r\n* +7.2.0 and below+: Shows a blank window.\r\n\r\nThis is not an issue when tapping the Android \"Back\" button on the child window. It's only an issue when calling the child window's {{close()}} method.\r\n\r\n*Note:*\r\nAs of Titanium 7.2.1, back-navigating from a child window exits out of the app when \"Don't keep activities\" is enabled. Titanium no longer \"restores\" parent windows due to the memory leak fixes made in 7.2.1. This is a separate issue.\r\n\r\n*Steps to reproduce:*\r\n# Go to the Android device's main \"Settings\" screen.\r\n# Tap on \"System\" under \"Settings.\r\n# Tap on \"Developer options\" under \"System\" settings.\r\n# Enable \"Don't keep activities\", which should be near the bottom of the list.\r\n# Build and run the below code on the above Android device.\r\n# Tap on the \"Open Child Window\" button.\r\n# Tap on the \"Close Window\" button.\r\n# Notice that the {{TabGoup}} will either be blank or the app will crash.\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({\r\n\t\ttext: title + \" View\",\r\n\t\ttop: \"25%\",\r\n\t}));\r\n\tvar openButton = Ti.UI.createButton({\r\n\t\ttitle: \"Open Child Window\",\r\n\t\ttop: \"50%\",\r\n\t});\r\n\topenButton.addEventListener(\"click\", function() {\r\n\t\tvar childWindow = Ti.UI.createWindow({\r\n\t\t\ttitle: title + \" Child Window\",\r\n\t\t\tbackgroundColor: \"white\",\r\n\t\t});\r\n\t\tvar closeButton = Ti.UI.createButton({\r\n\t\t\ttitle: \"Close Window\",\r\n\t\t});\r\n\t\tcloseButton.addEventListener(\"click\", function() {\r\n\t\t\tchildWindow.close();\r\n\t\t});\r\n\t\tchildWindow.add(closeButton);\r\n\t\tchildWindow.open();\r\n\t});\r\n\twindow.add(openButton);\r\n\tvar tab = Ti.UI.createTab({\r\n\t\ttitle: title,\r\n\t\twindow: window,\r\n\t});\r\n\treturn tab;\r\n}\r\n\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n\ttitle: \"TabGroup Parent Test\",\r\n\ttabs: [createTab(\"Tab 1\"), createTab(\"Tab 2\"), createTab(\"Tab 3\")],\r\n});\r\ntabGroup.open();\r\n{code}\r\n\r\n*Result on Titanium 7.2.0 and Below:*\r\n{{TabGroup}} will be empty. No tabs are shown.\r\n\r\n*Result on Titanium 8.0.0:*\r\n{{TabGroup}} will be empty. No tabs are shown.\r\n\r\n*Result on Titanium 7.2.1 - 7.5.1:*\r\nThe app will crash for these Titanium versions.\r\n{code}\r\n[ERROR] : TiExceptionHandler: (main) [89797,89797] Attempt to invoke virtual method 'android.app.Activity ti.modules.titanium.ui.TabGroupProxy.getActivity()' on a null object reference\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTab.getContentView(TiUIAbstractTab.java:55)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment.onCreateView(TiUIActionBarTab.java:52)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.Fragment.performCreateView(Fragment.java:2346)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1428)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3244)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3200)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:195)\r\n[ERROR] : TiExceptionHandler: android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:597)\r\n[ERROR] : TiExceptionHandler: android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1504)\r\n[ERROR] : TiExceptionHandler: android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)\r\n[ERROR] : TiExceptionHandler: android.app.Activity.performStart(Activity.java:7157)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)\r\n[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)\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:6669)\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", "attachment": [], "flagged": false, "summary": "Android: Calling child window's close() method back to TabGroup fails if \"Don't keep activities\" is enabled", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1124, "state": "closed", "name": "2019 Sprint 8", "startDate": "2019-03-31T18:03:00.000Z", "endDate": "2019-04-12T18:03:00.000Z", "completeDate": "2019-04-12T19:04:50.175Z", "originBoardId": 114 }, { "id": 1128, "state": "closed", "name": "2019 Sprint 9", "startDate": "2019-04-14T19:05:00.000Z", "endDate": "2019-04-26T19:05:00.000Z", "completeDate": "2019-04-26T22:05:13.933Z", "originBoardId": 114 }, { "id": 1129, "state": "closed", "name": "2019 Sprint 10", "startDate": "2019-04-28T22:06:00.000Z", "endDate": "2019-05-17T22:06:00.000Z", "completeDate": "2019-05-20T16:48:42.522Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "447636", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10829", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-12T01:57:06.000+0000", "updated": "2019-04-12T01:57:06.000+0000" }, { "id": "447994", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10868", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-26T22:31:55.000+0000", "updated": "2019-04-26T22:31:55.000+0000" }, { "id": "448004", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-26T23:17:38.000+0000", "updated": "2019-04-26T23:17:38.000+0000" }, { "id": "448038", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in SDK version 8.0.1.v20190426162041 and SDK version 8.1.0.v20190426222341.\r\n\r\nTest and other information can be found at: \r\nMaster : https://github.com/appcelerator/titanium_mobile/pull/10829\r\n8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10868\r\n\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-29T14:36:47.000+0000", "updated": "2019-04-29T14:36:47.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }