Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RenderThread SIGABRT

Tags:

android

crash

I'm receiving a native crash using a shared element transition between activities, but only for Android 8.1 and on Google devices (Pixel, Pixel 2, Nexus 6P, etc...):

pid: 20499, tid: 22683, name: RenderThread  >>> [APPNAME] <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sp<> assignment detected data race'
    x0   0000000000000000  x1   000000000000589b  x2   0000000000000006  x3   0000000000000008
    x4   0700007411003135  x5   0700007411003135  x6   0700007411003135  x7   3531ffffffffffff
    x8   0000000000000083  x9   0000000010000000  x10  0000007214bf4ca0  x11  0000000000000001
    x12  0000007214bf4dc0  x13  ffffffffffffffff  x14  ffffffffffff0000  x15  ffffffffffffffff
    x16  0000005c0f077fa8  x17  00000072b09c752c  x18  0000000000000008  x19  0000000000005013
    x20  000000000000589b  x21  0000000000000083  x22  00000072249f1f40  x23  00000072249f1f58
    x24  0000007214717590  x25  00000072248393a0  x26  00000072118d9220  x27  0000007214bf5350
    x28  0000007214bf5300  x29  0000007214bf4ce0  x30  00000072b097c760
    sp   0000007214bf4ca0  pc   00000072b097c788  pstate 0000000060000000
backtrace:
    #00 pc 000000000001d788  /system/lib64/libc.so (abort+120)
    #01 pc 0000000000007f08  /system/lib64/liblog.so (__android_log_assert+296)
    #02 pc 0000000000010af4  /system/lib64/libutils.so (android::sp_report_race()+28)
    #03 pc 00000000000fdd08  /system/lib64/libandroid_runtime.so (android::RootRenderNode::detachAnimators()+320)
    #04 pc 00000000000fbcac  /system/lib64/libandroid_runtime.so (android::AnimationContextBridge::destroy()+24)
    #05 pc 000000000006fbd0  /system/lib64/libhwui.so (android::uirenderer::renderthread::Bridge_destroy(android::uirenderer::renderthread::destroyArgs*)+12)
    #06 pc 00000000000718fc  /system/lib64/libhwui.so (android::uirenderer::renderthread::MethodInvokeRenderTask::run()+24)
    #07 pc 0000000000071c70  /system/lib64/libhwui.so (android::uirenderer::renderthread::SignalingRenderTask::run()+28)
    #08 pc 0000000000072a58  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+336)
    #09 pc 0000000000011478  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
    #10 pc 00000000000a9814  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
    #11 pc 0000000000067d80  /system/lib64/libc.so (__pthread_start(void*)+36)
    #12 pc 000000000001ec18  /system/lib64/libc.so (__start_thread+68)

It crashes also if the app is on background. How can I solve this? It seems to happen only if the Hardware Acceleration is enable, but I really need it enabled on my app.

like image 789
darkalbo Avatar asked Jun 04 '18 09:06

darkalbo


People also ask

When is the sigabrt signal raised?

The SIGABRT signal is raised when the abort function is called or when a user ABEND occurs. SIGABRT may not be raised for an ABEND issued by the SAS/C library, depending on the severity of the problem.

What is the ABEND code for sigabrt?

If SIGABRT results from a call to abort or raise , the program is terminated with user ABEND code 1210. If SIGABRT results from a call to siggen , the ABEND code is taken from the ABRT_t structure passed to siggen .

Can a handler for sigabrt return to point of interrupt?

Similarly, a handler for SIGABRT cannot return to the point of interrupt; an attempt to do so causes ABEND to be reissued. If you call siginfo after a SIGABRT signal occurs, siginfo returns a pointer to a structure of type ABRT_t .

What is the function of the render thread?

The render thread keeps a circular buffer of the failing call stack, which we can reconstruct internally by means of a proprietary debugger extension and private debug symbols to show the approximate initial point of failure.


1 Answers

I was having same issue with an AnimatedVectorDrawable set as a background of an ImageView. So basically i was showing the same animation in different rows of a recyclerview but using same object of AnimatedVectorDrawable, which lead to this crash. I solved it by creating separate objects for separate ViewHolders.

like image 139
shubham vashisht Avatar answered Oct 22 '22 14:10

shubham vashisht