I've googled/stack overflowed my buns off and implemented various solutions all over my codebase hoping to hit the needle in the haystack, but so far nothing, solutions include:
- Replacing any TimerTasks with Handlers,
- Making sure Canvas is never being accessed outside onDraw, and
- Making sure anything in onAnimationEnd that accesses the UI is actually on the UI thread
I cannot reproduce this crash locally to save my life and neither can my QA team. It only happens on Android 8. We've only received production crash reports from it.
The reason for the crash:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
_ZN7android10uirenderer20DeferredLayerUpdater5applyEv
The backtrace as shown by Google's ANRs and Crashes reporter:
#00 pc 0000000000049786 /system/lib/libhwui.so
(_ZN7android10uirenderer20DeferredLayerUpdater5applyEv+5)
#01 pc 00000000000378c3 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread13DrawFrameTask14syncFrameStateERNS0_8TreeInfoE+94)
#02 pc 00000000000377a5 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread13DrawFrameTask3runEv+96)
#03 pc 000000000003c127 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+166)
#04 pc 000000000000d469 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
#05 pc 0000000000079fe9 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80)
#06 pc 0000000000047db7 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#07 pc 000000000001b0a5 /system/lib/libc.so (__start_thread+32)
If anyone has any insight I would greatly appreciate it! Possibly even just how to see >60 days in the past in the Play Store for crash reports so I can see when this bug started and try to correlate it something. Thank you.