java.lang.RuntimeException: com.facebook.drawee.drawable.ForwardingDrawable.draw
See original GitHub issueDescription
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:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
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
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.