cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsha Kiran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10734) NullPointerException for Fade animation in SplashScreen plugin on android
Date Thu, 10 Mar 2016 18:57:40 GMT

    [ https://issues.apache.org/jira/browse/CB-10734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189737#comment-15189737
] 

Harsha Kiran commented on CB-10734:
-----------------------------------

Just wanted to add an update on this. After creating this issue I made this change in splashscreen.java:214

if (fadeSplashScreenDuration > 0 && splashImageView != null) and pushed an apk
but that results in different crash

```Fatal Exception: java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{2014d9d7
V.E..... R......D 0,0-1440,2560} not attached to window manager
       at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:412)
       at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:338)
       at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:118)
       at android.app.Dialog.dismissDialog(Dialog.java:509)
       at android.app.Dialog.dismiss(Dialog.java:492)
       at org.apache.cordova.splashscreen.SplashScreen$3.run(SplashScreen.java:243)
       at android.app.Activity.runOnUiThread(Activity.java:5716)
       at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen(SplashScreen.java:210)
       at org.apache.cordova.splashscreen.SplashScreen.onMessage(SplashScreen.java:180)
       at org.apache.cordova.PluginManager.postMessage(PluginManager.java:313)
       at org.apache.cordova.CordovaWebViewImpl.postMessage(CordovaWebViewImpl.java:377)
       at org.apache.cordova.splashscreen.SplashScreen$1.run(SplashScreen.java:156)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:6837)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)```

Full details here -> http://crashes.to/s/a4083ed1025

Also not sure if this might be related to https://issues.apache.org/jira/browse/CB-10692

> NullPointerException for Fade animation in SplashScreen plugin on android
> -------------------------------------------------------------------------
>
>                 Key: CB-10734
>                 URL: https://issues.apache.org/jira/browse/CB-10734
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin SplashScreen
>    Affects Versions: 3.2.0
>            Reporter: Harsha Kiran
>              Labels: android, splashscreen
>
> I couldn't replicate the issue on my device, but we see a lot of crash reports in our
crashlytics log with below message. So looking at code its crashing on splashImageView.setAnimation(fadeOut);
> So checking if splashImageView is null at line:214 might fix this issue.
> ```if (fadeSplashScreenDuration > 0)```
> ```Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method
'void android.widget.ImageView.setAnimation(android.view.animation.Animation)' on a null object
reference
>        at org.apache.cordova.splashscreen.SplashScreen$3.run(SplashScreen.java:219)
>        at android.app.Activity.runOnUiThread(Activity.java:5766)
>        at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen(SplashScreen.java:210)
>        at org.apache.cordova.splashscreen.SplashScreen.onMessage(SplashScreen.java:180)
>        at org.apache.cordova.PluginManager.postMessage(PluginManager.java:313)
>        at org.apache.cordova.CordovaWebViewImpl.postMessage(CordovaWebViewImpl.java:377)
>        at org.apache.cordova.splashscreen.SplashScreen$1.run(SplashScreen.java:156)
>        at android.os.Handler.handleCallback(Handler.java:739)
>        at android.os.Handler.dispatchMessage(Handler.java:95)
>        at android.os.Looper.loop(Looper.java:145)
>        at android.app.ActivityThread.main(ActivityThread.java:6897)
>        at java.lang.reflect.Method.invoke(Method.java)
>        at java.lang.reflect.Method.invoke(Method.java:372)
>        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
>        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)``` 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message