Crash in Lottie with NPE in BaseStrokeContent
See original GitHub issueEnvironment: Lottie: 2.5.0 Android OS: 4.3.1 Device: Galaxy Nexus (Emulator)
Steps Just load the load the animation: https://www.lottiefiles.com/download/1830
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at com.airbnb.lottie.animation.content.BaseStrokeContent.<init>(BaseStrokeContent.java:61)
at com.airbnb.lottie.animation.content.StrokeContent.<init>(StrokeContent.java:25)
at com.airbnb.lottie.model.content.ShapeStroke.toContent(ShapeStroke.java:77)
at com.airbnb.lottie.animation.content.ContentGroup.contentsFromModels(ContentGroup.java:30)
at com.airbnb.lottie.animation.content.ContentGroup.<init>(ContentGroup.java:60)
at com.airbnb.lottie.model.content.ShapeGroup.toContent(ShapeGroup.java:29)
at com.airbnb.lottie.animation.content.ContentGroup.contentsFromModels(ContentGroup.java:30)
at com.airbnb.lottie.animation.content.ContentGroup.<init>(ContentGroup.java:60)
at com.airbnb.lottie.model.layer.ShapeLayer.<init>(ShapeLayer.java:25)
at com.airbnb.lottie.model.layer.BaseLayer.forModel(BaseLayer.java:44)
at com.airbnb.lottie.model.layer.CompositionLayer.<init>(CompositionLayer.java:52)
at com.airbnb.lottie.LottieDrawable.buildCompositionLayer(LottieDrawable.java:225)
at com.airbnb.lottie.LottieDrawable.setComposition(LottieDrawable.java:187)
at com.airbnb.lottie.LottieAnimationView.setComposition(LottieAnimationView.java:468)
Issue Analytics
- State:
- Created 5 years ago
- Comments:17
Top Results From Across the Web
Java源代码 - 摸瓜
lottie. FontAssetDelegate.java; LottieComposition.java; utils ... EllipseContent.java; PolystarContent.java; MergePathsContent.java; BaseStrokeContent.java.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@gpeal https://github.com/HunkD/LottieCrash run this project on Android 4.4 x86 emulator will trigger crash
I’m going to close this as the above seems like a platform bug that Lottie can’t do anything about. The next version of Lottie won’t even accept JsonObjects anymore and it is discouraged to use them at any point in the pipeline because it purely adds overhead.