RenderThread SIGABRT

时间:2018-06-04 09:24:04

标签: android crash

我使用活动之间的共享元素转换收到本机崩溃,但仅适用于Android 8.1和Google设备(Pixel,Pixel 2,Nexus 6P等):

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)

如果应用程序在后台,它也会崩溃。我怎么解决这个问题?它似乎只有在硬件加速启用时才会发生,但我确实需要在我的应用上启用它。

1 个答案:

答案 0 :(得分:0)

我在将AnimatedVectorDrawable设置为ImageView的背景时遇到了相同的问题。所以基本上我在一个recyclerview的不同行中显示了相同的动画,但是使用了AnimatedVectorDrawable的相同对象,这导致了崩溃。我通过为单独的ViewHolders创建单独的对象来解决它。