question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: java.lang.StackOverflowError: stack size 8MB

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:48

github_iconTop GitHub Comments

3reactions
rimmercommented, Aug 19, 2019

@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'
1reaction
gpealcommented, Jul 11, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.StackOverflowError: stack size 8MB while Enabling ...
i was calling onBackPressed() recursively and that caused StackOverFlowError for me.
Read more >
java.lang.StackOverflowError: stack size 8MB
Typically, you'll get a stack overflow if you are recursively calling a function and either don't have an escape or you call it...
Read more >
java.lang.StackOverflowError: stack size 8MB Problem - Discuss
Typically, this is caused when your recursive functions doesn't have the correct termination condition, so it ends up calling itself forever. Or ...
Read more >
StackOverflowError - Android Developers
java.util.concurrent.atomic ... public class StackOverflowError ... Thrown when a stack overflow occurs because an application recurses too deeply.
Read more >
How to resolve the "java.lang.stackoverflowerror" in Java
The following code prints the numbers and has no terminating condition. The java.lang.stackoverflowerror error occurs because the stack's size has been ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found