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.

java.lang.RuntimeException: com.facebook.drawee.drawable.ForwardingDrawable.draw

See original GitHub issue

Description

I’m trying to solve crashes in Android Vitals and I received this twice yesterday on ZTE B2017G (tulip) running Android 9:

java.lang.RuntimeException: at android.view.DisplayListCanvas.throwIfCannotDraw (DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap (RecordingCanvas.java:98) at android.graphics.drawable.BitmapDrawable.draw (BitmapDrawable.java:545) at com.facebook.drawee.drawable.ForwardingDrawable.draw (ForwardingDrawable.java:185) at com.facebook.drawee.drawable.ForwardingDrawable.draw (ForwardingDrawable.java:185) at com.facebook.drawee.drawable.ScaleTypeDrawable.draw (ScaleTypeDrawable.java:139) at com.facebook.drawee.drawable.FadeDrawable.drawDrawableWithAlpha (FadeDrawable.java:319) at com.facebook.drawee.drawable.FadeDrawable.draw (FadeDrawable.java:306) at com.facebook.drawee.drawable.ForwardingDrawable.draw (ForwardingDrawable.java:185) at com.facebook.drawee.generic.RootDrawable.draw (RootDrawable.java:81) at android.widget.ImageView.onDraw (ImageView.java:1342) at android.view.View.draw (View.java:20234) at android.view.View.updateDisplayListIfDirty (View.java:19109) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.View.draw (View.java:19962) at android.view.ViewGroup.drawChild (ViewGroup.java:4337) at androidx.recyclerview.widget.RecyclerView.drawChild (RecyclerView.java:4820) at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4114) at android.view.View.draw (View.java:20237) at androidx.recyclerview.widget.RecyclerView.draw (RecyclerView.java:4219) at android.view.View.updateDisplayListIfDirty (View.java:19109) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4321) at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4294) at android.view.View.updateDisplayListIfDirty (View.java:19069) at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:686) at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:692) at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:801) at android.view.ViewRootImpl.draw (ViewRootImpl.java:3373) at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:3163) at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2532) at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1505) at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7354) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1092) at android.view.Choreographer.doCallbacks (Choreographer.java:888) at android.view.Choreographer.doFrame (Choreographer.java:819) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1078) at android.os.Handler.handleCallback (Handler.java:873) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:201) at android.app.ActivityThread.main (ActivityThread.java:6810) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

Additional Information

  • Fresco version: 1.13.0
  • Platform version: ZTE B2017G (tulip) running Android 9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
oprisnikcommented, Jun 14, 2019

So your issue is probably that you don’t properly manage the memory for the ImageView case, which means it tries to draw a recycled bitmap. That’s why we need a custom view instead of image view or you need to manually hold on to the reference / release. We have a guide for this here: https://frescolib.org/docs/writing-custom-views.html

0reactions
stale[bot]commented, Jun 28, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.RuntimeException: Canvas: trying to draw too large ...
Open your drawable folder check all images size and changing the size your images it work for me. Share.
Read more >
com.facebook.drawee.drawable - Fresco API
A forwarding drawable class - the goal is to forward (delegate) drawable functionality to an inner drawable instance. InstrumentedDrawable, Used to log image...
Read more >
Facebook - Bountysource
Bug with add SimpleDraweeView object using setImageURI when Uri. ... My app crashes while trying to draw very large gif image. ... Caused...
Read more >
Joe Sandbox Cloud Basic - Analysis Report 37342
ExceptionHandler;->writeValueToFile:155, API Call: java.io.FileWriter.<init> ... RoundedBitmapDrawable->shouldRound at com.facebook.drawee.drawable.
Read more >
ScalingUtils.ScaleType - Fresco API
Enum<E extends java.lang.Enum<E>>. ↳, com.facebook.drawee.drawable.ScalingUtils.ScaleType ... To use matrix scaling, use a MatrixDrawable.
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