admin管理员组

文章数量:815885

RenderThread线程报错记录

RenderThread线程报错是很蛋疼的,它是属于native报错,而且还会有各种情况。

04-23 16:31:38.343 17895 17895 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-23 16:31:38.344 17895 17895 F DEBUG   : Build fingerprint: 'xiaomi/tiffany/tiffany:7.1.2/N2G47H/V9.5.1.0.NDBCNFA:user/release-keys'
04-23 16:31:38.344 17895 17895 F DEBUG   : Revision: '0'
04-23 16:31:38.344 17895 17895 F DEBUG   : ABI: 'arm'
04-23 16:31:38.344 17895 17895 F DEBUG   : pid: 7587, tid: 7783, name: RenderThread  >>> com.sohu.sohuvideo <<<
04-23 16:31:38.345 17895 17895 F DEBUG   : signal 6 (SIGABRT), code 0 (SI_USER), fault addr --------
04-23 16:31:38.398 17895 17895 F DEBUG   : Abort message: 'GL errors! frameworks/base/libs/hwui/BakedOpRenderer.cpp:98'
04-23 16:31:38.398 17895 17895 F DEBUG   :     r0 00000000  r1 00001e67  r2 00000006  r3 00000008
04-23 16:31:38.398 17895 17895 F DEBUG   :     r4 bace5978  r5 00000006  r6 bace5920  r7 0000010c
04-23 16:31:38.398 17895 17895 F DEBUG   :     r8 bace5378  r9 eadb8268  sl eadb82e0  fp c37798b8
04-23 16:31:38.398 17895 17895 F DEBUG   :     ip 0000000c  sp bace4ef0  lr ebb1a2f7  pc ebb1cb78  cpsr 200f0010
04-23 16:31:38.408 17895 17895 F DEBUG   : 
04-23 16:31:38.408 17895 17895 F DEBUG   : backtrace:
04-23 16:31:38.408 17895 17895 F DEBUG   :     #00 pc 00049b78  /system/lib/libc.so (tgkill+12)
04-23 16:31:38.408 17895 17895 F DEBUG   :     #01 pc 000472f3  /system/lib/libc.so (pthread_kill+34)
04-23 16:31:38.408 17895 17895 F DEBUG   :     #02 pc 0001d595  /system/lib/libc.so (raise+10)
04-23 16:31:38.408 17895 17895 F DEBUG   :     #03 pc 000190e1  /system/lib/libc.so (__libc_android_abort+34)
04-23 16:31:38.408 17895 17895 F DEBUG   :     #04 pc 00017144  /system/lib/libc.so (abort+4)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #05 pc 0000c545  /system/lib/libcutils.so (__android_log_assert+112)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #06 pc 000614c1  /system/lib/libhwui.so
04-23 16:31:38.409 17895 17895 F DEBUG   :     #07 pc 000246bb  /system/lib/libhwui.so
04-23 16:31:38.409 17895 17895 F DEBUG   :     #08 pc 000242a1  /system/lib/libhwui.so
04-23 16:31:38.409 17895 17895 F DEBUG   :     #09 pc 00025f13  /system/lib/libhwui.so
04-23 16:31:38.409 17895 17895 F DEBUG   :     #10 pc 0002952d  /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #11 pc 0000e481  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #12 pc 000675ed  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #13 pc 00046dc3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
04-23 16:31:38.409 17895 17895 F DEBUG   :     #14 pc 00019b2d  /system/lib/libc.so (__start_thread+6)

看到这个错误栈,是不是觉得,完全不知道怎么入手,因为这是崩溃到了底层,而且没有java栈。不过我们知道是一个GL errors错误。
这篇文章解释了报错的地方,没有给出解决办法。
搜索一下log日志,有如下的log

04-23 16:31:34.584  7587  7783 W Adreno-GSL: <sharedmem_gpuobj_alloc:2021>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
04-23 16:31:34.586  7587  7783 E Adreno-GSL: <gsl_memory_alloc_pure:2135>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
04-23 16:31:34.587  7587  7783 W Adreno-GSL: <sharedmem_gpuobj_alloc:2021>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
04-23 16:31:34.588  7587  7783 E Adreno-GSL: <gsl_memory_alloc_pure:2135>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
04-23 16:31:34.589  7587  7783 W Adreno-GSL: <sharedmem_gpuobj_alloc:2021>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
04-23 16:31:34.590  7587  7783 E Adreno-GSL: <gsl_memory_alloc_pure:2135>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
04-23 16:31:34.594  7587  7783 E OpenGLRenderer: GL error:  Out of memory!
04-23 16:31:34.595  7587  7783 F OpenGLRenderer: GL errors! frameworks/base/libs/hwui/BakedOpRenderer.cpp:98

这就是报错的根源,是底层发生了OOM。网上也没解决办法
[这篇文章有点参考价值]

RenderThread除了报OOM错,还有别的错:
Android 7 Native Crash: libc.so tgkill
App crashes after exiting with a “signal 6 (SIGABRT)” in RenderThread

tgkill - native error on Android 8.0 Samsung S8

本文标签: RenderThread线程报错记录