{ "id": "84551", "key": "TIMOB-7024", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13408", "description": "Sprint 2012-12 API", "name": "Sprint 2012-12 API", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-04T05:01:03.000+0000", "created": "2012-01-06T17:01:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_activityindicator", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "20366", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "86155", "key": "TIMOB-7678", "fields": { "summary": "Android: OptionDialog does not always not always open", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "20361", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "86155", "key": "TIMOB-7678", "fields": { "summary": "Android: OptionDialog does not always not always open", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-28T20:32:05.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": "h3. Expected behavior\r\nThe window opens , push the button to open another window, push the hardware back android button, we need to be able to do this so many times without problems.\r\n\r\nh3. Actual behavior\r\nThe window opens, push the button to open another window, push the hardware back android button, wait 2 seconds, an error alert goes up\r\n\r\nh3. Test Case\r\n{code:title=app.js|borderStyle=solid}\r\nvar win1 = Ti.UI.createWindow({\r\n\tfullscreen : false\r\n});\r\n\r\nwin1.add(Ti.UI.createLabel({\r\n\ttop : '0dp',\r\n\ttext : 'Win1'\r\n}));\r\n\r\nwin2Button = Ti.UI.createButton({\r\n\ttitle : 'Open Win2'\r\n});\r\n\r\nwin2Button.addEventListener('click', function(){\r\n\tvar win2 = Ti.UI.createWindow({\r\n\t\tfullscreen : false\r\n\t});\r\n\twin2.add(Ti.UI.createLabel({\r\n\t\ttop : '0dp',\r\n\t\ttext : 'Win2'\r\n\t}));\r\n\t\r\n\tvar win2BackButton = Ti.UI.createButton({\r\n\t\ttitle : 'Go Back'\r\n\t});\r\n\t\r\n\twin2BackButton.addEventListener('click', function(){\r\n\t\twin2.close();\r\n\t});\r\n\t\r\n\twin2.add(win2BackButton);\r\n\t\r\n\twin2.open();\r\n});\r\n\r\nwin1.add(win2Button);\r\n\r\n\r\n\r\nwin1.addEventListener('focus', function(){\r\n\t\r\n\tvar actInd = Ti.UI.createActivityIndicator({\r\n\t\tbottom : 10,\r\n\t\theight : 50,\r\n\t\twidth : 10,\r\n\t\tmessage : 'Loading...'\r\n\t});\r\n\t\r\n\tactInd.show();\r\n\t\r\n\tsetTimeout(function(){\r\n\t\tactInd.hide();\r\n\t}, 2000);\r\n\t\r\n});\r\n\r\n\r\nwin1.open();\r\n{code}\r\n\r\nh3. Log\r\n{code:title=log|borderStyle=solid}\r\nD/AndroidRuntime( 724): Shutting down VM\r\nW/dalvikvm( 724): threadid=1: thread exiting with uncaught exception (group=0x40015560)\r\nE/TiApplication( 724): (main) [1675,11364] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: View not attached to window manager; Titanium 1.8.0.1,2011/12/17 19:53,c903964\r\nE/TiApplication( 724): java.lang.IllegalArgumentException: View not attached to window manager\r\nE/TiApplication( 724): \tat android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)\r\nE/TiApplication( 724): \tat android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)\r\nE/TiApplication( 724): \tat android.view.Window$LocalWindowManager.removeView(Window.java:432)\r\nE/TiApplication( 724): \tat android.app.Dialog.dismissDialog(Dialog.java:278)\r\nE/TiApplication( 724): \tat android.app.Dialog.access$000(Dialog.java:71)\r\nE/TiApplication( 724): \tat android.app.Dialog$1.run(Dialog.java:111)\r\nE/TiApplication( 724): \tat android.app.Dialog.dismiss(Dialog.java:268)\r\nE/TiApplication( 724): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217)\r\nE/TiApplication( 724): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77)\r\nE/TiApplication( 724): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiApplication( 724): \tat android.os.Looper.loop(Looper.java:130)\r\nE/TiApplication( 724): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/TiApplication( 724): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiApplication( 724): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/TiApplication( 724): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/TiApplication( 724): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/TiApplication( 724): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime( 724): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 724): java.lang.IllegalArgumentException: View not attached to window manager\r\nE/AndroidRuntime( 724): \tat android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)\r\nE/AndroidRuntime( 724): \tat android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)\r\nE/AndroidRuntime( 724): \tat android.view.Window$LocalWindowManager.removeView(Window.java:432)\r\nE/AndroidRuntime( 724): \tat android.app.Dialog.dismissDialog(Dialog.java:278)\r\nE/AndroidRuntime( 724): \tat android.app.Dialog.access$000(Dialog.java:71)\r\nE/AndroidRuntime( 724): \tat android.app.Dialog$1.run(Dialog.java:111)\r\nE/AndroidRuntime( 724): \tat android.app.Dialog.dismiss(Dialog.java:268)\r\nE/AndroidRuntime( 724): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217)\r\nE/AndroidRuntime( 724): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77)\r\nE/AndroidRuntime( 724): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/AndroidRuntime( 724): \tat android.os.Looper.loop(Looper.java:130)\r\nE/AndroidRuntime( 724): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/AndroidRuntime( 724): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 724): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/AndroidRuntime( 724): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/AndroidRuntime( 724): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/AndroidRuntime( 724): \tat dalvik.system.NativeStart.main(Native Method)\r\nW/ActivityManager( 64): Force finishing activity com.appcelerator.app562821/org.appcelerator.titanium.TiActivity\r\nD/dalvikvm( 724): GC_CONCURRENT freed 254K, 47% free 3104K/5831K, external 1497K/1828K, paused 5ms+4ms\r\nW/ActivityManager( 64): Activity pause timeout for HistoryRecord{40753b30 com.appcelerator.app562821/org.appcelerator.titanium.TiActivity}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: ActivityIndicator on window focus event crash", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium SDK version: 1.8.0 / 1.8.0.1 / 1.9.0\r\nPlatform OS: Android\r\nPlatform OS Version: 2.3.3\r\nDevice Details: simulator \r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio Build 1.0.6.201110251616", "comment": { "comments": [ { "id": "182413", "author": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Having a similar issue, or at least getting the same stack trace in the crash log on the android dev console.", "updateAuthor": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-08T13:08:45.000+0000", "updated": "2012-02-08T13:08:45.000+0000" }, { "id": "185334", "author": { "name": "geshafer", "key": "geshafer", "displayName": "Gale Shafer", "active": true, "timeZone": "America/Indiana/Indianapolis" }, "body": "Can Verify that this is still an issue in SDK 2.0.0.v20120306123149", "updateAuthor": { "name": "geshafer", "key": "geshafer", "displayName": "Gale Shafer", "active": true, "timeZone": "America/Indiana/Indianapolis" }, "created": "2012-03-07T07:43:44.000+0000", "updated": "2012-03-07T07:43:44.000+0000" }, { "id": "185341", "author": { "name": "ryanmarr934", "key": "ryanmarr934", "displayName": "Ryan Marr", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have implemented a work around to this issue for now. Add an event listener to your window for the \"android:back\" event that will close the window.", "updateAuthor": { "name": "ryanmarr934", "key": "ryanmarr934", "displayName": "Ryan Marr", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-07T08:26:50.000+0000", "updated": "2012-03-07T08:26:50.000+0000" }, { "id": "185351", "author": { "name": "geshafer", "key": "geshafer", "displayName": "Gale Shafer", "active": true, "timeZone": "America/Indiana/Indianapolis" }, "body": "Ryan, I'm glad you found a temporary work around and appreciate the suggestion; however, the specified workaround only applies to scenarios caused by the back button. This issue happens if focus is purposely shifted to a different window, via another source other than the back button, while an activity indicator is in use.", "updateAuthor": { "name": "geshafer", "key": "geshafer", "displayName": "Gale Shafer", "active": true, "timeZone": "America/Indiana/Indianapolis" }, "created": "2012-03-07T09:24:57.000+0000", "updated": "2012-03-07T09:24:57.000+0000" }, { "id": "185485", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "This might be related to this: https://gist.github.com/1986524", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-03-08T02:49:40.000+0000", "updated": "2012-03-08T02:49:40.000+0000" }, { "id": "195203", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested with 2.0.1GA2 on a Samsung Galaxy S2, issue still exists.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-17T14:05:47.000+0000", "updated": "2012-05-17T14:05:47.000+0000" }, { "id": "197290", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Submitted [PR #2324|https://github.com/appcelerator/titanium_mobile/pull/2324] to resolve this issue.\r\nOnce fix is applied I can no longer reproduce any crashes when returning to the first window. Activity indicator\r\nshows and goes away after 2 seconds w/o any crash. Was never able to reproduce the stack trace on this ticket on master, but\r\ndid run into null pointer and timing issues with activity switching.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T10:21:06.000+0000", "updated": "2012-06-05T10:21:06.000+0000" }, { "id": "199894", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Verified with:\r\nTitanium Studio, build: 2.1.0.201206221045\r\nTitanium SDK: 2.1.0.v20120622174154\r\nDevices: Samsung Galaxy tab (3.2) and Android simulator", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T11:10:30.000+0000", "updated": "2012-06-23T11:10:30.000+0000" }, { "id": "201486", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-04T05:00:29.000+0000", "updated": "2012-07-04T05:00:29.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }