5

I have a strange issue. I got this crash report from Crashlyitics. This seems doesn't show any line my activity code. So i didn't know when this error happened. Please anyone have idea when this exception happened. Any possible scenario?

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
       at android.view.ViewRootImpl.setView(ViewRootImpl.java:692)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:345)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
       at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
       at android.view.Window$LocalWindowManager.addView(Window.java:556)
       at android.widget.MediaController.show(MediaController.java:338)
       at android.webkit.HTML5VideoFullScreen.showControllerInFullScreen(HTML5VideoFullScreen.java:386)
       at android.webkit.HTML5VideoViewProxy$VideoPlayer.end(HTML5VideoViewProxy.java:311)
       at android.webkit.HTML5VideoViewProxy.handleMessage(HTML5VideoViewProxy.java:432)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:137)
       at android.app.ActivityThread.main(ActivityThread.java:4895)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
       at dalvik.system.NativeStart.main(NativeStart.java)
Amsheer
  • 6,666
  • 8
  • 39
  • 74
  • http://stackoverflow.com/a/18665887/1602281 please review this. This can solve your problem – rahultheOne Aug 18 '14 at 13:31
  • Ok is there any idea android.webkit.HTML5VideoFullScreen.showControllerInFullScreen(HTML5VideoFullScreen.java:386). It shows about HTML5Video. Any clue? – Amsheer Aug 18 '14 at 13:39
  • http://stackoverflow.com/questions/20131276/how-to-stop-webview-video-running-in-background#comment30201938_20131276 – trante Dec 10 '14 at 13:29
  • Looks like it's an issue with the WebView for android versions prior to 4.3. http://stackoverflow.com/questions/20131276/how-to-stop-webview-video-running-in-background You could also checkout http://stackoverflow.com/questions/38280810/webview-video-fullscreen-mode-crash-in-some-of-android-device-when-using-applica – PenguinBlues Nov 04 '16 at 02:15

1 Answers1

1

It seems, below line of code causes the app crash which actually generating and showing some dialog window that never get dismiss / cancel when Activity (screen) is destroyed. please check whatever dialogs opening by that screen all those are closed or dismiss before that activity getting destroy.

at android.widget.MediaController.show(MediaController.java:338)