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
Crash in GradientColor.lerp in 5.2 and later #2298
Comments
Could you provide an animation (preferably an AEP file) that crashes? |
Can you attach an animation that causes the crash? It'll be hard to debug or fix this without it. |
@gpeal Could you please share with me how I can contact you or where I can send the files? |
You can send it to lottietestapps [at] gmail |
@gpeal I've sent you another animation that crashes with |
Describe the bug
After #2081 has been merged, certain animations with gradient trasforms are crashing.
The issue is that here:
https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java#L148
the length of steps for GradientColor can change, and this can result in
https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/GradientColorKeyframeAnimation.java
receiving GradientColors of different lengths.
This eventually leads to crash in this line:
https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/model/content/GradientColor.java#L37
with
java.lang.ArrayIndexOutOfBoundsException
What version of Lottie did you test this on?
versions
5.2
and6.0
experience the crashversion
5.1.1
works fine (it's before the mentioned PR has been merged)What version of Android did you test this on?
Android version makes no difference - the crash is related to library code and specific lottie files
Steps To Reproduce
I've provided the crasshing lottie files to @gpeal
Every attempt to display the animation ends with
ArrayIndexOutOfBoundsException
Screenshots
the app just crashes
The text was updated successfully, but these errors were encountered: