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

com.airbnb.lottie.model.content.ShapeData.getInitialPoint()' on a null object reference #1252

Closed
shizhongyu opened this issue Jun 6, 2019 · 8 comments

Comments

@shizhongyu
Copy link

image

@gpeal
Copy link
Collaborator

gpeal commented Jun 10, 2019

@shizhongyu Please attach your animation and any repro steps.

@shizhongyu
Copy link
Author

sleep (2).txt

@shizhongyu
Copy link
Author

@gpeal

@grandstaish
Copy link

grandstaish commented Jun 11, 2019

We're getting very similar errors too. I'll see if I'm allowed to send you the animations publicly. (FWIW, these animations all work on iOS.)

We're also loading these animations using setAnimationFromUrl if it makes a difference.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.airbnb.lottie.model.content.ShapeData.getCurves()' on a null object reference
        at com.airbnb.lottie.model.content.ShapeData.interpolateBetween(ShapeData.java:55)
        at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:23)
        at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:11)
        at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
        at com.airbnb.lottie.animation.content.ShapeContent.getPath(ShapeContent.java:61)
        at com.airbnb.lottie.animation.content.FillContent.draw(FillContent.java:88)
        at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
        at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
        at com.airbnb.lottie.model.layer.ShapeLayer.drawLayer(ShapeLayer.java:30)
        at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
        at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
        at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
        at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
        at android.widget.ImageView.onDraw(ImageView.java:1360)
java.lang.IllegalStateException: Missing values for keyframe.
        at com.airbnb.lottie.animation.keyframe.FloatKeyframeAnimation.getValue(FloatKeyframeAnimation.java:16)
        at com.airbnb.lottie.animation.keyframe.FloatKeyframeAnimation.getValue(FloatKeyframeAnimation.java:8)
        at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
        at com.airbnb.lottie.animation.keyframe.SplitDimensionPathKeyframeAnimation.setProgress(SplitDimensionPathKeyframeAnimation.java:28)
        at com.airbnb.lottie.animation.keyframe.SplitDimensionPathKeyframeAnimation.<init>(SplitDimensionPathKeyframeAnimation.java:22)
        at com.airbnb.lottie.model.animatable.AnimatableSplitDimensionPathValue.createAnimation(AnimatableSplitDimensionPathValue.java:21)
        at com.airbnb.lottie.animation.keyframe.TransformKeyframeAnimation.<init>(TransformKeyframeAnimation.java:35)
        at com.airbnb.lottie.model.animatable.AnimatableTransform.createAnimation(AnimatableTransform.java:78)
        at com.airbnb.lottie.model.layer.BaseLayer.<init>(BaseLayer.java:102)
        at com.airbnb.lottie.model.layer.ShapeLayer.<init>(ShapeLayer.java:21)
        at com.airbnb.lottie.model.layer.BaseLayer.forModel(BaseLayer.java:45)
        at com.airbnb.lottie.model.layer.CompositionLayer.<init>(CompositionLayer.java:52)
        at com.airbnb.lottie.LottieDrawable.buildCompositionLayer(LottieDrawable.java:243)
        at com.airbnb.lottie.LottieDrawable.setComposition(LottieDrawable.java:205)
        at com.airbnb.lottie.LottieAnimationView.setComposition(LottieAnimationView.java:408)
        at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:62)
        at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:60)
        at com.airbnb.lottie.LottieTask.notifySuccessListeners(LottieTask.java:153)
        at com.airbnb.lottie.LottieTask.access$200(LottieTask.java:26)
        at com.airbnb.lottie.LottieTask$1.run(LottieTask.java:140)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.airbnb.lottie.model.content.ShapeData.isClosed()' on a null object reference
        at com.airbnb.lottie.model.content.ShapeData.interpolateBetween(ShapeData.java:52)
        at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:23)
        at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:11)
        at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
        at com.airbnb.lottie.animation.content.ShapeContent.getPath(ShapeContent.java:61)
        at com.airbnb.lottie.animation.content.BaseStrokeContent.getBounds(BaseStrokeContent.java:248)
        at com.airbnb.lottie.animation.content.ContentGroup.getBounds(ContentGroup.java:175)
        at com.airbnb.lottie.animation.content.ContentGroup.getBounds(ContentGroup.java:175)
        at com.airbnb.lottie.model.layer.ShapeLayer.getBounds(ShapeLayer.java:35)
        at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:209)
        at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
        at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
        at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
        at android.widget.ImageView.onDraw(ImageView.java:1360)
        at android.view.View.draw(View.java:20207)

@gpeal
Copy link
Collaborator

gpeal commented Jun 12, 2019

@shizhongyu @grandstaish Have you upgraded to Lottie 3.0+ (3.0.6 is the latest)?
@shizhongyu Your animation renders fine for me.
@grandstaish The second one is #1177 and the others might be related.

@grandstaish
Copy link

grandstaish commented Jun 13, 2019

Updating lottie fixed the issues 🙈Thanks @gpeal!

@gpeal
Copy link
Collaborator

gpeal commented Jun 13, 2019

@shizhongyu I'm going to close this because upgrading will likely fix this for you too.

@bruscantini
Copy link

This sol'n doesn't work if I need to stay on version 2.6.1 for iOS purposes. Any fix without upgrading?

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

No branches or pull requests

4 participants