{ "id": "61262", "key": "TIMOB-630", "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": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2018-08-02T17:06:41.000+0000", "created": "2011-04-15T02:33:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "exalture" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "12032", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62647", "key": "TIMOB-2015", "fields": { "summary": "Android: UI.TabGroup - missing close event", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-02T17:08: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": "start with a standalone window that fires an event, a listener\r\nin app.js then closes the window and opens a tabgroup (think logon\r\nwindow) - all good.\r\n\r\nthe tabgroup fires an event which is listened to in app.js which\r\ncloses the tabgroup and opens the initial window. This fails - the\r\ntabgroup goes away, logging shows the original window is being\r\nre-built, but it is never shown. It is shown in iPhone.\r\n\r\nPseudo code for app.js...\r\n\r\n{code}\r\nvar loginWin;\r\nvar logoutGroup;\r\n\r\nfunction makeLoginWindow() {\r\n loginWin = window with single button firing LOGIN event;\r\n loginWin.open();\r\n}\r\n\r\nfunction makeLogoutWindow() {\r\n logoutGroup = tabGroup containing one window with...\r\n\r\n single button firing LOGOUT event;\r\n\r\n logoutGroup.close();\r\n}\r\n\r\nmakeLoginWindow()\r\naddEventListener(LOGIN) {\r\n loginWin.close();\r\n makeLogoutWindow();\r\n}\r\n\r\naddEventListener(LOGOUT) {\r\n logoutGroup.close();\r\n makeLoginWindow();\r\n}\r\n{code}\r\n\r\n* Should this work?\r\n* Should I raise this sort of thing as a query or ask in the forums in future?\r\n", "attachment": [ { "id": "17875", "filename": "testi.zip", "author": { "name": "danmullineux", "key": "danmullineux", "displayName": "Dan Mullineux", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:14.000+0000", "size": 1396, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: TabGroup stops window being re-shown", "creator": { "name": "danmullineux", "key": "danmullineux", "displayName": "Dan Mullineux", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.7.2 and 2.0\r\nAndroid Emulator 2.2", "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "123680", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I can confirm that this issue still exists on android, using\nlatest builds of both 1.4.X and 1.5 master dated 6th Nov 2010, tested via the android emulator on ubuntu.

\n

There is another ticket describing this, or a very similar, issue at #2015. Hence, maybe this ticket can be closed as a duplicate.

{html}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:33:15.000+0000", "updated": "2011-04-20T13:23:01.000+0000" }, { "id": "123681", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Deleted by poster", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:33:16.000+0000", "updated": "2011-04-20T13:21:48.000+0000" }, { "id": "161630", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When the tabGroup closes, the windows loose their event listeners.\r\n\r\nStep 1: run the code below\r\nStep 2: click the login button\r\nStep 3: click the logout button\r\nStep 4: click the login button again (notice that it does not work this time because the eventListener has gone missing)\r\n\r\n{code:title=\"app.js\"}\r\nvar master = Titanium.UI.createWindow({ \r\n title:'main',\r\n fullscreen : false,\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar mButton = Titanium.UI.createButton({\r\n\ttitle:'Login',\r\n\theight:50,\r\n\twidth:200\r\n});\r\n\r\nmButton.addEventListener('click',function() {\r\n\tmaster.close();\r\n\ttabGroup.open();\r\n});\r\nmaster.add(mButton);\r\n\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\nvar tButton = Titanium.UI.createButton({\r\n\ttitle:'Log off',\r\n\theight:50,\r\n\twidth:200\r\n});\r\nwin1.add(tButton);\r\ntabGroup.addTab(tab1);\r\n\r\ntButton.addEventListener('click', function() {\r\n\ttabGroup.close();\r\n\tmaster.open();\r\n});\r\n\r\nmaster.open();\r\n{code}\r\n\r\nh3. Tested with\r\nTiSDK 1.7.2\r\nAndroid Emulator 2.2\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-448628", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-02T18:34:42.000+0000", "updated": "2011-09-06T09:36:34.000+0000" }, { "id": "164524", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Jon, could you please provide me an working example of the workaround. I don't seem to manage to make it work. And it's pretty urgent :(\r\n\r\nThank you.", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-08-30T10:48:56.000+0000", "updated": "2011-08-30T10:49:35.000+0000" }, { "id": "165064", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After more testing, the workaround is not reliable. I am removing it from the ticket.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-06T09:36:03.000+0000", "updated": "2011-09-06T09:36:03.000+0000" }, { "id": "184282", "author": { "name": "asosa@parabu.com", "key": "asosa@parabu.com", "displayName": "Art Sosa", "active": true, "timeZone": "America/Chicago" }, "body": "FYI. bug is still present within 1.8.1 Android. Works as expected in iOS 1.8.1.", "updateAuthor": { "name": "asosa@parabu.com", "key": "asosa@parabu.com", "displayName": "Art Sosa", "active": true, "timeZone": "America/Chicago" }, "created": "2012-02-25T03:54:46.000+0000", "updated": "2012-02-25T03:54:46.000+0000" }, { "id": "194715", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tried it with 2.0.1GA2 on a Samsung Galaxy S2 (2.3.6) and the issue still exists. If you keep pressing login/logout, the app will eventually crash. Works fine on the iOS simulator.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-14T14:35:41.000+0000", "updated": "2012-05-14T14:35:41.000+0000" }, { "id": "195050", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not able to reproduce the bug anymore on 2.1 latest CI build.\r\nMarking as closed.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-16T14:35:08.000+0000", "updated": "2012-05-16T14:35:08.000+0000" }, { "id": "214053", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested the code with a Samsung Galaxy S3, TiSDK 2.2.0v20120810194112, TiStudio 2.1.1.201207271312 and the app crashes when I press the 'log out' button. This is the ddms output:\r\n\r\n{code}\r\n08-13 10:26:21.752: E/TiApplication(4610): (main) [1673,1673] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 2.2.0,2012/08/10 19:41,61078b0\r\n08-13 10:26:21.752: E/TiApplication(4610): java.lang.NullPointerException\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat android.content.ComponentName.(ComponentName.java:75)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat android.content.Intent.(Intent.java:3219)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.createIntent(TiUIActivityWindow.java:558)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.createNewActivity(TiUIActivityWindow.java:112)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.(TiUIActivityWindow.java:81)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleOpen(ActivityWindowProxy.java:110)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:96)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:91)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat android.os.Looper.loop(Looper.java:137)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat android.app.ActivityThread.main(ActivityThread.java:4514)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)\r\n08-13 10:26:21.752: E/TiApplication(4610): \tat dalvik.system.NativeStart.main(Native Method)\r\n08-13 10:26:21.752: D/MenuAppsGridFragment(884): onResume\r\n08-13 10:26:21.752: W/InputManagerService(532): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@42a88168 (uid=10138 pid=4610)\r\n08-13 10:26:21.762: E/MP-Decision(1291): UP Ld:34 Nw:1.990000 Tw:140 rq:2.900000 seq:145.000000\r\n08-13 10:26:21.762: W/SurfaceFlinger(224): id=99(19) createSurface 0xa3504c (720x1280),1 flag=0\r\n08-13 10:26:21.762: D/KeyguardViewMediator(532): setHidden false\r\n08-13 10:26:21.762: D/STATUSBAR-StatusBarManagerService(532): setSystemUiVisibility(0x0)\r\n08-13 10:26:21.762: D/STATUSBAR-StatusBarManagerService(532): manageDisableList what=0x0 pkg=WindowManager.LayoutParams\r\n08-13 10:26:21.772: I/Adreno200-EGLSUB(884): : Format RGBA_8888.\r\n08-13 10:26:21.772: D/memalloc(224): ion: Allocated buffer base:0x4399a000 size:3768320 fd:38\r\n08-13 10:26:21.772: D/memalloc(884): ion: Mapped buffer base:0x5f496000 size:3768320 offset:0 fd:60\r\n08-13 10:26:21.782: I/ClipboardServiceEx(532): Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() !\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): FATAL EXCEPTION: main\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): java.lang.NullPointerException\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat android.content.ComponentName.(ComponentName.java:75)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat android.content.Intent.(Intent.java:3219)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.createIntent(TiUIActivityWindow.java:558)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.createNewActivity(TiUIActivityWindow.java:112)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat ti.modules.titanium.ui.TiUIActivityWindow.(TiUIActivityWindow.java:81)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleOpen(ActivityWindowProxy.java:110)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:96)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:91)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat android.os.Looper.loop(Looper.java:137)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat android.app.ActivityThread.main(ActivityThread.java:4514)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)\r\n08-13 10:26:21.812: E/AndroidRuntime(4610): \tat dalvik.system.NativeStart.main(Native Method)\r\n{code}", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-13T10:30:06.000+0000", "updated": "2012-08-13T10:30:06.000+0000" }, { "id": "325435", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "With heavyweight windows, each window (or TabGroup) corresponds to an activity and to launch an activity, current activity is needed. Closing the current window before opening the new window makes the current activity inaccessible and hence the crash. I think changing the order by opening the new window and closing the old one will work. Something like\r\n\r\n tabGroup.open();\r\n master.close();\r\n \r\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-09-24T16:05:29.000+0000", "updated": "2014-09-24T16:05:29.000+0000" }, { "id": "439702", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up old tickets. If this is still requested, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-02T17:06:17.000+0000", "updated": "2018-08-02T17:06:17.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }