gpt4 book ai didi

android - RenderThread SIGABRT

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:35:54 24 4
gpt4 key购买 nike

我在 Activity 之间使用共享元素转换时收到 native 崩溃,但仅适用于 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)

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

最佳答案

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

关于android - RenderThread SIGABRT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50677295/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com