Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13094

Showing splash screen crashes if the activity is in the process of finishing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • cordova@7.0.0
    • None

    Description

      Showing of splash screen is attached to js event "onbeforeunload". When application being closed by pressing "back" button, we gots:

      FATAL EXCEPTION: main
      Process: scat.su.calltaxi, PID: 16999
      android.view.WindowManager$BadTokenException: Unable to add window – token android.os.BinderProxy@5d0142d is not valid; is your activity running?
      at android.view.ViewRootImpl.setView(ViewRootImpl.java:567)
      at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)
      at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:86)
      at android.app.Dialog.show(Dialog.java:326)
      at org.apache.cordova.splashscreen.SplashScreen$5.run(SplashScreen.java:318)
      at android.app.Activity.runOnUiThread(Activity.java:5558)
      at org.apache.cordova.splashscreen.SplashScreen.showSplashScreen(SplashScreen.java:281)
      at org.apache.cordova.splashscreen.SplashScreen.onMessage(SplashScreen.java:189)
      at org.apache.cordova.PluginManager.postMessage(PluginManager.java:312)
      at org.apache.cordova.CordovaWebViewImpl.postMessage(CordovaWebViewImpl.java:377)
      at org.apache.cordova.splashscreen.SplashScreen$3.run(SplashScreen.java:169)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5517)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

      Attachments

        Issue Links

          Activity

            People

              filmaj Filip Maj
              sharupoff Andrey Sharapov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: