android 模拟crash_Android crash问题分析定位方法

当Android APP出现crash异常时,可通过分析tombstone文件定位问题。例如,一个SIGABRT异常(EGL_BAD_ALLOC)表明内存申请失败。使用addr2line和objdump工具,结合汇编代码和源码分析,可以确定错误发生的具体位置和原因,如数组越界等。通过对tombstone、addr2line和汇编的综合分析,能有效解决这类问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Android APP在运行过程中如出现crash异常,会产生tombstone文件,存放在/data/tombstones目录下。思路之一:我们可以通过分析tombstone来定位问题原因。

crash异常日志如下:

11-06 09:26:19.495 F/libc ( 993): Fatal signal 6 (SIGABRT), code -6 in tid 1046 (RenderThread)

11-06 09:26:19.496 W/ ( 191): debuggerd: handling request: pid=993 uid=1000 gid=1000 tid=1046

11-06 09:26:19.577 F/DEBUG ( 7490): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

11-06 09:26:19.577 F/DEBUG ( 7490): Build fingerprint: 'Android/rk3288/rk3288:7.1.2/NHG47K/wf06232042:userdebug/test-keys'

11-06 09:26:19.577 F/DEBUG ( 7490): Revision: '0'

11-06 09:26:19.577 F/DEBUG ( 7490): ABI: 'arm'

11-06 09:26:19.577 F/DEBUG ( 7490): pid: 993, tid: 1046, name: RenderThread >>> com.test.Digi <<<

11-06 09:26:19.577 F/DEBUG ( 7490): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

11-06 09:26:19.584 F/DEBUG ( 7490): Abort message: 'Encountered EGL error 12291 EGL_BAD_ALLOC during rendering'

11-06 09:26:19.584 F/DEBUG ( 7490): r0 00000000 r1 00000416 r2 00000006 r3 00000008

11-06 09:26:19.584 F/DEBUG ( 7490): r4 967df978 r5 00000006 r6 967df920 r7 0000010c

11-06 09:26:19.584 F/DEBUG ( 7490): r8 03fb7340 r9 00000000 sl b2f3453c fp b2f34538

11-06 09:26:19.584 F/DEBUG ( 7490): ip 00000016 sp 967def10 lr b511d857 pc b51200c0 cpsr 680f0010

11-06 09:26:19.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值