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

NullPointerException for Fade animation in SplashScreen plugin on android

    XMLWordPrintableJSON

Details

    Description

      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)```

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              harshabonthu Harsha Kiran
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: