You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
12-27 22:03:35.873 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Canvas.save()' on a null object reference
12-27 22:03:35.873 E AndroidRuntime: at com.facebook.litho.widget.TextDrawable.draw(TextDrawable.java:120)
12-27 22:03:35.873 E AndroidRuntime: at com.facebook.litho.ComponentHost$InterleavedDispatchDraw.drawNext(ComponentHost.java:1406)
12-27 22:03:35.873 E AndroidRuntime: at com.facebook.litho.ComponentHost$InterleavedDispatchDraw.-$$Nest$mdrawNext(ComponentHost.java:0)
12-27 22:03:35.873 E AndroidRuntime: at com.facebook.litho.ComponentHost.getChildDrawingOrder(ComponentHost.java:800)
12-27 22:03:35.873 E AndroidRuntime: at android.view.ViewGroup.getAndVerifyPreorderedIndex(ViewGroup.java:2097)
12-27 22:03:35.873 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4287)
12-27 22:03:35.873 E AndroidRuntime: at com.facebook.litho.ComponentHost.dispatchDraw(ComponentHost.java:749)
12-27 22:03:35.873 E AndroidRuntime: at android.view.View.draw(View.java:23220)
Now, TextDrawable.draw(Canvas) is being passed a null canvas from ComponentHost$InterleavedDispatchDraw.-$$Nest$mdrawNext. That method checks that mcanvas != null, otherwise it returns. The only thing setting mCanvas to null is ComponentHost$InterleavedDispatchDraw.-$$Nest$mend. So it seems another thread is calling end() while drawNext() is in process.
Possible Fixes
Should end() call isRunning() and abort if it's still running? If so, callers would have to retry `end()
Should InterleavedDispatchDraw synchronize itself?
The text was updated successfully, but these errors were encountered:
Version
We are using quite an old version: v2021.10.25
Description
Stack trace:
Now,
TextDrawable.draw(Canvas)
is being passed a null canvas fromComponentHost$InterleavedDispatchDraw.-$$Nest$mdrawNext
. That method checks thatmcanvas != null
, otherwise it returns. The only thing settingmCanvas
to null isComponentHost$InterleavedDispatchDraw.-$$Nest$mend
. So it seems another thread is callingend()
whiledrawNext()
is in process.Possible Fixes
end()
callisRunning()
and abort if it's still running? If so, callers would have to retry `end()InterleavedDispatchDraw
synchronize itself?The text was updated successfully, but these errors were encountered: