{ "id": "63790", "key": "TIMOB-3158", "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": "11363", "description": "Mobile 1.8.0 M10", "name": "Sprint 2011-31", "archived": true, "released": true, "releaseDate": "2011-08-08" }, { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-09-29T11:52:39.000+0000", "created": "2011-04-15T03:38:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "verified-1.7.3" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "issuelinks": [], "assignee": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-09-29T11:52:39.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": "{html}

split off from #3099. Seen on a nexus s (2.3.1) running\r\n[INFO] Titanium SDK version: 1.6.0 (02/08/11\r\n20:55 bd9d124...)

\r\n

1.Mashups > YQL > YQL + Flickr

\r\n

results: intermittent crash - pastie here: http://pastie.org/1550070

\r\n

E/TiUncaughtHandler( 7825):\r\nandroid.view.WindowManager$BadTokenException: Unable to add window\r\n-- token android.os.BinderProxy@40512ad8 is not valid; is your\r\nactivity running?

{html}", "attachment": [], "flagged": false, "summary": "Android: Activity indicator crashes app with \"is your activity running?\"", "creator": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130180", "author": { "name": "mikerobinson", "key": "mikerobinson", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've been having this error in my own code a lot! I have\nmitigated it some by reducing the number of activity indicators I\nam using and checking that the current activity is the same one as\nthe one that the activity indicator will be created from. Very\nannoying as I use activity indicators a lot.

\n

Perhaps this link will help the developers.
\n\nhttp://dimitar.me/android-displaying-dialogs-from-background-threads/

{html}", "updateAuthor": { "name": "mikerobinson", "key": "mikerobinson", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:38:19.000+0000", "updated": "2011-04-15T03:38:19.000+0000" }, { "id": "132970", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "h1. Reproduction\nI have a solid reproduction of this using activity indicators on Android here: https://gist.github.com/370939b6e54dadf6f5a9\n\nUsing that sample code, follow the on screen instructions and it should crash every time.\n\nh2. Tested On\nSamsung Epic 4G 2.2\nBROKEN on 1.7.0 (04/05/11 10:30 731db9c...)\nBROKEN on 1.6.2 (03/30/11 17:25 0243d42...)\nBROKEN on 1.6.1 (03/09/11 10:58 6d9b0f3...)\n\nh2. Crash Log\n{code}\n\nW/InputManagerService( 2450): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@484f2b28 (uid=10029 pid=18019)\nV/InputDevice( 2450): ID[0]=0(0) Dn(0=>1)\nV/WindowManager( 2450): Dsptch > Window{485a8c58 com.fede.launcher/com.fede.launcher.Launcher paused=false}\nV/WindowManager( 2450): Dsptch > Window{485a8c58 com.fede.launcher/com.fede.launcher.Launcher paused=false}\nV/InputDevice( 2450): ID[0]=0(0) Up(1=>0)\nI/ActivityManager( 2450): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.dawson.playgroundmobile/.PlaygroundmobileActivity bnds=[365,58][475,188] }\nV/InputDevice( 2450): ID[0]=0(0) Dn(0=>1)\nV/WindowManager( 2450): Dsptch > Window{48647550 com.dawson.playgroundmobile/org.appcelerator.titanium.TiActivity paused=false}\nV/InputDevice( 2450): ID[0]=0(0) Up(1=>0)\nV/WindowManager( 2450): Dsptch > Window{48647550 com.dawson.playgroundmobile/org.appcelerator.titanium.TiActivity paused=false}\nE/TiUIView(18300): (main) [3425,11059] TAP, TAP, TAP on [Ti.UI.Button]\nD/AndroidRuntime(18300): Shutting down VM\nW/dalvikvm(18300): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0)\nW/WindowManager( 2450): Attempted to add application window with unknown token HistoryRecord{487b0e18 com.dawson.playgroundmobile/.ShareActivityActivity}. Aborting.\nE/TiUncaughtHandler(18300): (main) [158,11217] Sending event: exception on thread: main msg:android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@482f8eb8 is not valid; is your activity running?; Titanium 1.6.1,2011/03/09 10:58,d9b0f3...\nE/TiUncaughtHandler(18300): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@482f8eb8 is not valid; is your activity running?\nE/TiUncaughtHandler(18300): \tat android.view.ViewRoot.setView(ViewRoot.java:505)\nE/TiUncaughtHandler(18300): \tat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)\nE/TiUncaughtHandler(18300): \tat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)\nE/TiUncaughtHandler(18300): \tat android.view.Window$LocalWindowManager.addView(Window.java:424)\nE/TiUncaughtHandler(18300): \tat android.app.Dialog.show(Dialog.java:241)\nE/TiUncaughtHandler(18300): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleShow(TiUIActivityIndicator.java:200)\nE/TiUncaughtHandler(18300): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.show(TiUIActivityIndicator.java:124)\nE/TiUncaughtHandler(18300): \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:45)\nE/TiUncaughtHandler(18300): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:212)\nE/TiUncaughtHandler(18300): \tat android.os.Handler.dispatchMessage(Handler.java:95)\nE/TiUncaughtHandler(18300): \tat android.os.Looper.loop(Looper.java:123)\nE/TiUncaughtHandler(18300): \tat android.app.ActivityThread.main(ActivityThread.java:4627)\nE/TiUncaughtHandler(18300): \tat java.lang.reflect.Method.invokeNative(Native Method)\nE/TiUncaughtHandler(18300): \tat java.lang.reflect.Method.invoke(Method.java:521)\nE/TiUncaughtHandler(18300): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)\nE/TiUncaughtHandler(18300): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\nE/TiUncaughtHandler(18300): \tat dalvik.system.NativeStart.main(Native Method)\nE/AndroidRuntime(18300): FATAL EXCEPTION: main\nE/AndroidRuntime(18300): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@482f8eb8 is not valid; is your activity running?\nE/AndroidRuntime(18300): \tat android.view.ViewRoot.setView(ViewRoot.java:505)\nE/AndroidRuntime(18300): \tat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)\nE/AndroidRuntime(18300): \tat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)\nE/AndroidRuntime(18300): \tat android.view.Window$LocalWindowManager.addView(Window.java:424)\nE/AndroidRuntime(18300): \tat android.app.Dialog.show(Dialog.java:241)\nE/AndroidRuntime(18300): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleShow(TiUIActivityIndicator.java:200)\nE/AndroidRuntime(18300): \tat ti.modules.titanium.ui.widget.TiUIActivityIndicator.show(TiUIActivityIndicator.java:124)\nE/AndroidRuntime(18300): \tat ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:45)\nE/AndroidRuntime(18300): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:212)\nE/AndroidRuntime(18300): \tat android.os.Handler.dispatchMessage(Handler.java:95)\nE/AndroidRuntime(18300): \tat android.os.Looper.loop(Looper.java:123)\nE/AndroidRuntime(18300): \tat android.app.ActivityThread.main(ActivityThread.java:4627)\nE/AndroidRuntime(18300): \tat java.lang.reflect.Method.invokeNative(Native Method)\nE/AndroidRuntime(18300): \tat java.lang.reflect.Method.invoke(Method.java:521)\nE/AndroidRuntime(18300): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)\nE/AndroidRuntime(18300): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\nE/AndroidRuntime(18300): \tat dalvik.system.NativeStart.main(Native Method)\nI/ ( 2450): dumpmesg > \"/data/log/dumpstate_app_error.log\"\nW/ActivityManager( 2450): Force finishing activity com.dawson.playgroundmobile/org.appcelerator.titanium.TiActivity\nW/ActivityManager( 2450): Activity pause timeout for HistoryRecord{48cd00b8 com.dawson.playgroundmobile/org.appcelerator.titanium.TiActivity}\n{code}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-29T12:41:53.000+0000", "updated": "2011-04-29T12:41:53.000+0000" }, { "id": "132971", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "h2. Associated Helpdesk Ticket\nhttp://appc.me/c/APP-935438", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-29T12:43:38.000+0000", "updated": "2011-04-29T12:43:38.000+0000" }, { "id": "158736", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h3.Associated Helpdesk Ticket\r\nAnother customer relies on this, http://appc.me/c/APP-935438\r\n\r\nWhenever the app has been relaunched and attempts to show an activity indicator, this exception is produced.\r\n\r\nh3.Environment Target\r\n{noformat}\r\n+ **Product**: Mobile \r\n+ **Titanium SDK**: Mobile 1.7.1 \r\n+ **Platform OS**: Android \r\n+ **Platform OS Version**: 2.1+\r\n{noformat}\r\n\r\nh3.Crash Log\r\n{noformat}\r\nandroid.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@405162b8 is not valid; is your activity running?\r\nat android.view.ViewRoot.setView(ViewRoot.java:527)\r\nat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)\r\nat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)\r\nat android.view.Window$LocalWindowManager.addView(Window.java:465)\r\nat android.app.Dialog.show(Dialog.java:241)\r\nat ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleShow(TiUIActivityIndicator.java:200)\r\nat ti.modules.titanium.ui.widget.TiUIActivityIndicator.show(TiUIActivityIndicator.java:124)\r\nat ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:44)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.show(TiViewProxy.java:473)\r\nat ti.modules.titanium.ui.TiDialogProxy.access$001(TiDialogProxy.java:13)\r\nat ti.modules.titanium.ui.TiDialogProxy$1.onCurrentActivityReady(TiDialogProxy.java:31)\r\nat org.appcelerator.titanium.util.TiUIHelper$4.onPostOpen(TiUIHelper.java:152)\r\nat org.appcelerator.titanium.proxy.TiWindowProxy$1.run(TiWindowProxy.java:278)\r\nat android.os.Handler.handleCallback(Handler.java:587)\r\nat android.os.Handler.dispatchMessage(Handler.java:92)\r\nat android.os.Looper.loop(Looper.java:123)\r\nat android.app.ActivityThread.main(ActivityThread.java:3835)\r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\nat java.lang.reflect.Method.invoke(Method.java:507)\r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)\r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)\r\nat dalvik.system.NativeStart.main(Native Method)\r\n{noformat} ", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-07-06T08:20:04.000+0000", "updated": "2011-07-06T08:20:04.000+0000" }, { "id": "161787", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same (or similar ) issue happens with Titanium.UI.createAlertDialog", "updateAuthor": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-03T21:08:04.000+0000", "updated": "2011-08-03T21:08:04.000+0000" }, { "id": "162014", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Merged fix to both 1_7_X and master. Verified Dawson's test doesn't fail in 1_7_X or master.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-08-05T10:15:42.000+0000", "updated": "2011-08-05T10:15:42.000+0000" }, { "id": "165815", "author": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved.\n\nTested on:\nMac OSX Lion\nTiMob: 1.8.0.v20110906155354\nTiStud: 1.0.5.201109091616\n\nDevices Used:\nAndroid Emulator 2.2\nDroid3\nGoogle Nexus S", "updateAuthor": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-13T10:01:27.000+0000", "updated": "2011-09-13T10:01:27.000+0000" }, { "id": "167339", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with OSX 10.6.8, Titanium Studio, build: 1.0.5.201109261308, SDK 1.7.3.v20110928185013, Emulator and Nexus S 2.3.4 using Dawson's sample code. Reclosing.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-29T11:52:33.000+0000", "updated": "2011-09-29T11:52:33.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }