lottie-android: Error: java.lang.StackOverflowError: stack size 8MB

I’m not really sure why it happens but maybe i’m not releasing my fragment ( there is 3 fragment on top and each of it has 1 Lottie animation view )

Device: P6 android 5.0

Fatal Exception: java.lang.StackOverflowError: stack size 8MB
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 838(LottieAnimationView.java:838)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.updateDisplayListIfDirty + 14215(View.java:14215)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw + 1873(ConstraintLayout.java:1873)
       at android.view.View.draw + 15363(View.java:15363)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw + 1873(ConstraintLayout.java:1873)
       at android.view.View.draw + 15363(View.java:15363)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw + 2670(PhoneWindow.java:2670)
       at android.view.View.draw + 15363(View.java:15363)
       at android.widget.FrameLayout.draw + 647(FrameLayout.java:647)
       at com.android.internal.policy.impl.PhoneWindow$DecorView.draw + 2649(PhoneWindow.java:2649)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.ThreadedRenderer.updateViewTreeDisplayList + 267(ThreadedRenderer.java:267)
       at android.view.ThreadedRenderer.updateRootDisplayList + 273(ThreadedRenderer.java:273)
       at android.view.ThreadedRenderer.draw + 312(ThreadedRenderer.java:312)
       at android.view.ViewRootImpl.draw + 2852(ViewRootImpl.java:2852)
       at android.view.ViewRootImpl.performDraw + 2689(ViewRootImpl.java:2689)
       at android.view.ViewRootImpl.performTraversals + 2313(ViewRootImpl.java:2313)
       at android.view.ViewRootImpl.doTraversal + 1251(ViewRootImpl.java:1251)
       at android.view.ViewRootImpl$TraversalRunnable.run + 6438(ViewRootImpl.java:6438)
       at android.view.Choreographer$CallbackRecord.run + 795(Choreographer.java:795)
       at android.view.Choreographer.doCallbacks + 598(Choreographer.java:598)
       at android.view.Choreographer.doFrame + 567(Choreographer.java:567)
       at android.view.Choreographer$FrameDisplayEventReceiver.run + 781(Choreographer.java:781)
       at android.os.Handler.handleCallback + 810(Handler.java:810)
       at android.os.Handler.dispatchMessage + 99(Handler.java:99)
       at android.os.Looper.loop + 189(Looper.java:189)
       at android.app.ActivityThread.main + 5529(ActivityThread.java:5529)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke + 372(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 950(ZygoteInit.java:950)
       at com.android.internal.os.ZygoteInit.main + 745(ZygoteInit.java:745)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 48

Commits related to this issue

Most upvoted comments

@AndroidDeveloperLB First, add sonatype to repositories

repositories {
    /** ... **/
    // this is for lottie SNAPSHOT
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

Then, use SNAPSHOT version in deps:

implementation 'com.airbnb.android:lottie:3.1.0-SNAPSHOT'

@AndroidDeveloperLB I never said it didn’t exist. I just need to be able to reproduce it to fix it.