WindowManager$BadTokenException: Unable to add window -- is your activity running?

319 views
Skip to first unread message

William Ferguson

unread,
Dec 25, 2012, 5:56:49 PM12/25/12
to google-adm...@googlegroups.com
I'm getting an awful number of the following crashes being reported lately. I presume it is due to how one of the ad networks is attempting to present their ad after a click?

I've found that the WindowManager$BadTokenException: is your activity running? is generally due to the user closing the Activity before the dialog has had a chance to start being displayed (often because the dialog took too long). THier doesn't seem to be a way of interceding to handle to the crash or to determine which network/ad is at fault. Can anyone think of a good way to perform either?


android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@44958930 is not valid; is your activity running?
at android.view.ViewRoot.setView(ViewRoot.java:472)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:424)
at android.app.Dialog.show(Dialog.java:239)
at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:504)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4595)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)


William
Reply all
Reply to author
Forward
0 new messages