cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13094) Showing splash screen crashes if the activity is in the process of finishing
Date Wed, 26 Jul 2017 23:50:00 GMT


ASF GitHub Bot commented on CB-13094:

Github user infil00p commented on the issue:
    Going to about:blank is done as a garbage collection technique before closing out the
WebView entirely so that the memory is freed.  There's a hilarious TODO here saying that it
shouldn't destroy the WebView until about:blank is done loading.  
    But yeah, I agree with the fix.  The Splashscreen shouldn't try to attach a UI element
to the Activity while the Activity is basically killing itself on a backbutton, or some other
exit event, and that's clearly what's causing this behaviour.  
    Of course, if we never made this a plugin in the first place, we wouldn't have such a
weird disconnect between this plugin and the platform code, so there is that.

> Showing splash screen crashes if the activity is in the process of finishing
> ----------------------------------------------------------------------------
>                 Key: CB-13094
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-splashscreen
>    Affects Versions: cordova@7.0.0
>            Reporter: Andrey Sharapov
>            Priority: Trivial
>              Labels: bug
> Showing of splash screen is attached to js event "onbeforeunload". When application being
closed by pressing "back" button, we gots:
> {quote}FATAL EXCEPTION: main
> Process:, 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(
>        at android.view.WindowManagerGlobal.addView(
>        at android.view.WindowManagerImpl.addView(
>        at
>        at org.apache.cordova.splashscreen.SplashScreen$
>        at
>        at org.apache.cordova.splashscreen.SplashScreen.showSplashScreen(
>        at org.apache.cordova.splashscreen.SplashScreen.onMessage(
>        at org.apache.cordova.PluginManager.postMessage(
>        at org.apache.cordova.CordovaWebViewImpl.postMessage(
>        at org.apache.cordova.splashscreen.SplashScreen$
>        at android.os.Handler.handleCallback(
>        at android.os.Handler.dispatchMessage(
>        at android.os.Looper.loop(
>        at
>        at java.lang.reflect.Method.invoke(Native Method)
>        at$
>        at{quote}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message