[ 
https://issues.apache.org/jira/browse/CB-10692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Polivy updated CB-10692:
----------------------------
    Description: 
On Android, there is a small race condition in the code to hide the splash 
screen when a fade out is used. It may only be visible in certain edge cases, 
but the net result is that the app will crash.

Specifically, if multiple calls come in to {{removeSplashScreen}} in a row, 
it's possible for the first call to null out {{splashImageView}} before the 
second call uses it (but after the second call tests for {{splashDialog == 
null}}), because of the animation delay.

Crashing code: 
https://github.com/apache/cordova-plugin-splashscreen/blob/master/src/android/SplashScreen.java#L219

The easiest fix is likely to protect this will a null check prior to using it.

  was:
On Android, there is a small race condition in the code to hide the splash 
screen. It may only be visible in certain edge cases, but the net result is 
that the app will crash.

Specifically, if multiple calls come in to {{removeSplashScreen}}, it's 
possible for the first call to null out {{splashImageView}} before the second 
call uses it (but after the second call tests for {{splashDialog == null}}).

https://github.com/apache/cordova-plugin-splashscreen/blob/master/src/android/SplashScreen.java#L219

The easiest fix is likely to protect this will a null check prior to using it.



> [Android] SplashScreen plugin crashes due to race condition on hide
> -------------------------------------------------------------------
>
>                 Key: CB-10692
>                 URL: https://issues.apache.org/jira/browse/CB-10692
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin SplashScreen
>    Affects Versions: 3.2.0
>            Reporter: Dan Polivy
>
> On Android, there is a small race condition in the code to hide the splash 
> screen when a fade out is used. It may only be visible in certain edge cases, 
> but the net result is that the app will crash.
> Specifically, if multiple calls come in to {{removeSplashScreen}} in a row, 
> it's possible for the first call to null out {{splashImageView}} before the 
> second call uses it (but after the second call tests for {{splashDialog == 
> null}}), because of the animation delay.
> Crashing code: 
> https://github.com/apache/cordova-plugin-splashscreen/blob/master/src/android/SplashScreen.java#L219
> The easiest fix is likely to protect this will a null check prior to using it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to