Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointer crash problem #2483

Closed
yunlinos opened this issue Mar 15, 2024 · 0 comments · Fixed by #2486
Closed

NullPointer crash problem #2483

yunlinos opened this issue Mar 15, 2024 · 0 comments · Fixed by #2486

Comments

@yunlinos
Copy link
Contributor

Hello, my app crashed suddenly, and i need your help.

The crash rate is extremely low and I can't pinpoint the exact time it occurs. However, this issue has affected 9 users, with one user experiencing the crash 9000 times.

java.lang.NullPointerException: Attempt to invoke interface method 'float android.view.animation.Interpolator.getInterpolation(float)' on a null object reference
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getInterpolatedCurrentKeyframeProgress(BaseKeyframeAnimation.java:110)
at com.airbnb.lottie.animation.keyframe.FloatKeyframeAnimation.getFloatValue(FloatKeyframeAnimation.java:43)
at com.airbnb.lottie.model.layer.BaseLayer.lambda$setupInOutAnimations$0(BaseLayer.java:185)
at com.airbnb.lottie.model.layer.BaseLayer.lambda$setupInOutAnimations$0$BaseLayer
at com.airbnb.lottie.model.layer.-$$Lambda$BaseLayer$4LxogRHfsgkEfWkfLvNOorPl2m0.onValueChanged
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.notifyListeners(BaseKeyframeAnimation.java:69)
at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.setProgress(BaseKeyframeAnimation.java:63)
at com.airbnb.lottie.model.layer.BaseLayer.setProgress(BaseLayer.java:582)
at com.airbnb.lottie.model.layer.CompositionLayer.setProgress(CompositionLayer.java:163)
at com.airbnb.lottie.LottieDrawable$1.onAnimationUpdate(LottieDrawable.java:94)
at com.airbnb.lottie.utils.BaseLottieAnimator.notifyUpdate(BaseLottieAnimator.java:99)
at com.airbnb.lottie.utils.LottieValueAnimator.doFrame(LottieValueAnimator.java:107)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:965)
at android.view.Choreographer.doCallbacks(Choreographer.java:791)
at android.view.Choreographer.doFrame(Choreographer.java:722)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)

What version of Lottie did you test this on? 6.3.0
What version of Android did you test this on? Android 10, API 29

I found a similar issue on Github (#2050) and I suspect that the crash might be due to keyframe.interpolator being null. I would like to know if it is necessary to add null checks before using keyframe.interpolator to prevent this issue.

Looking forward to your reply, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant