You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级至API 32后Android应用偶现Native Crash无法复现求助

API 32升级后偶现Native Crash排查求助

应用升级至API 32(minSdkVersion为21,targetSdkVersion、compileSdkVersion均为32)后,Crashlytics上报了Native Crash,但无法稳定复现。测试设备为Galaxy A32(Android 12)和Galaxy Tab A(Android 11)。

崩溃栈信息

Signal Catcher (runnable):tid=6 systid=8150 
#00 pc 0x377c45 libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool) + 76)
#01 pc 0x446fc7 libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const + 386)
#02 pc 0x442993 libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const + 34)
#03 pc 0x45f569 libart.so (art::DumpCheckpoint::Run(art::Thread*) + 664)
#04 pc 0x45ab43 libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*) + 354)
#05 pc 0x45a07b libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool) + 1486)
#06 pc 0x459775 libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) + 604)
#07 pc 0x411eeb libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) + 130)
#08 pc 0x421aa3 libart.so (art::SignalCatcher::HandleSigQuit() + 1046)
#09 pc 0x420e3b libart.so (art::SignalCatcher::Run(void*) + 290)
#10 pc 0xaaf33 libc.so (__pthread_start(void*) + 40)
#11 pc 0x642e3 libc.so (__start_thread + 30)

Jit thread pool worker thread 0 (native):tid=7 systid=8151 
#00 pc 0x5e4a8 libc.so (syscall + 28)
#01 pc 0x131bb3 libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*) + 82)
#02 pc 0x460a87 libart.so (art::ThreadPool::GetTask(art::Thread*) + 58)
#03 pc 0x460199 libart.so (art::ThreadPoolWorker::Run() + 72)
#04 pc 0x45fdd9 libart.so (art::ThreadPoolWorker::Callback(void*) + 116)
#05 pc 0xaaf33 libc.so (__pthread_start(void*) + 40)
#06 pc 0x642e3 libc.so (__start_thread + 30)

排查方向建议

  • 提取完整崩溃信息:当前仅显示Signal Catcher线程栈,需在Crashlytics中查看触发崩溃的原始线程栈和信号类型(如SIGSEGV、SIGABRT),这是定位根因的关键
  • 核对API 32行为变更:Android 12(API 32)的权限、前台服务、Native库加载等规则有调整,检查应用及依赖库是否适配这些变更
  • 排查JIT编译问题:栈中出现JIT线程,可尝试临时禁用JIT编译(在AndroidManifest.xml的<application>标签添加android:enableJitCompilation="false"),观察崩溃是否消失
  • 升级第三方Native库:若应用使用了第三方SDK(地图、推送等),确认其版本是否支持API 32,优先升级到最新稳定版
  • 监控内存状态:偶现Native Crash常与内存问题相关,用Memory Profiler或LeakCanary监控内存泄漏,同时抓取崩溃时的logcat系统日志
  • 设备ART兼容性测试:部分三星设备的ART虚拟机版本可能存在适配问题,可在目标设备上开启Native调试,复现后获取更详细的Native崩溃上下文

内容的提问来源于stack exchange,提问作者user3192161

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 05:35:36