分析Unity崩溃日志(Android)

发布时间:2024年01月18日
Unity版本:

这里Unity版本是Unity 2019.4.30f1

崩溃信息:

错误信息如下:

Exception Appversion: versionName = 1.0.1 versionCode = 1
Process: sg.atla.f.c
PID: 22716
UID: 10749
Flags: 0x3088be44
Package: sg.atla.f.c v1 (1.0.1)
Foreground: Yes
Build: vivo/1938_2019/1938:10/QP1A.190711.020/compiler08241240:user/release-keys

java.lang.Error	*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2019.4.30f1 (e8c891080a1f)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'vivo/1938_2019/1938:10/QP1A.190711.020/compiler08241240:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-01-12 21:47:31+0700
pid: 22716, tid: 24610, name: UnityMain  >>> sg.atla.f.c <<<
uid: 10749
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  0000000000000000  x1  0000007ec4fd4048  x2  0000000000000002  x3  0000000000000000
    x4  0000000000000000  x5  0000007e3362e9e4  x6  0000007dac9be800  x7  0000007dac9be800
    x8  0000007e336302b8  x9  0000000000000001  x10 0000000000000000  x11 0000000000000000
    x12 00000000000002d0  x13 0000000000000001  x14 0000000000000001  x15 0000007ca3c68c90
    x16 0000007dac6e9930  x17 0000007ec5255618  x18 0000007dc9c66000  x19 0000007dac76a000
    x20 0000007dac76a000  x21 00000000145fe518  x22 00000000144ff9a8  x23 0000000000000001
    x24 0000000012e80158  x25 0000000012e41d00  x26 0000000000000001  x27 0000000000000000
    x28 0000000000000000  x29 0000000000000001
    sp  0000007e3362ef80  lr  0000007dabaf0f78  pc  0000007dabaf0f78

backtrace:
      #00 pc 000000000032cf78  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #01 pc 000000000032e1a4  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #02 pc 000000000032fe70  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #03 pc 0000000000092694  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/oat/arm64/base.odex

-2
java.lang.Error: FATAL EXCEPTION [UnityMain]
Unity version     : 2019.4.30f1
Device model      : vivo vivo 2019
Device fingerprint: vivo/1938_2019/1938:10/QP1A.190711.020/compiler08241240:user/release-keys

Caused by: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2019.4.30f1 (e8c891080a1f)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'vivo/1938_2019/1938:10/QP1A.190711.020/compiler08241240:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-01-12 21:47:31+0700
pid: 22716, tid: 24610, name: UnityMain  >>> sg.atla.f.c <<<
uid: 10749
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  0000000000000000  x1  0000007ec4fd4048  x2  0000000000000002  x3  0000000000000000
    x4  0000000000000000  x5  0000007e3362e9e4  x6  0000007dac9be800  x7  0000007dac9be800
    x8  0000007e336302b8  x9  0000000000000001  x10 0000000000000000  x11 0000000000000000
    x12 00000000000002d0  x13 0000000000000001  x14 0000000000000001  x15 0000007ca3c68c90
    x16 0000007dac6e9930  x17 0000007ec5255618  x18 0000007dc9c66000  x19 0000007dac76a000
    x20 0000007dac76a000  x21 00000000145fe518  x22 00000000144ff9a8  x23 0000000000000001
    x24 0000000012e80158  x25 0000000012e41d00  x26 0000000000000001  x27 0000000000000000
    x28 0000000000000000  x29 0000000000000001
    sp  0000007e3362ef80  lr  0000007dabaf0f78  pc  0000007dabaf0f78

backtrace:
      #00 pc 000000000032cf78  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #01 pc 000000000032e1a4  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #02 pc 000000000032fe70  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/lib/arm64/libunity.so (BuildId: a4ee0b5e1f43348c0be087ab5049fdb15ed93758)
      #03 pc 0000000000092694  /data/app/sg.atla.f.c-X8gAZBdXGv-FRSH9Eo4oPg==/oat/arm64/base.odex
  at libunity
  at libunity
  at libunity
  at base
关键信息解释:

注意关键信息’arm64-v8a’ ABI: ‘arm64’ 这里是指arm64的崩溃,需要找arm64-v8a的符号表,其它符号表按照次逻辑查找。
libil2cpp指libil2cpp.sym.so文件
libunity指libunity.sym.so文件

so文件位置:

有两种获取方式:
1、项目目录下临时目录

{项目编译后路径}\Temp\StagingArea\symbols

2、导出安卓工程的时候,选择Create symbols.zip,此时符号表压缩包会在导出安卓工程目录下面

符号化工具位置:
E:\software\unity\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin

在这里插入图片描述
aarch64-linux-android-addr2line 这个是arm64的
arm-linux-androideabi-addr2line 这个是arm32的

cd到addr2line目录

.\aarch64-linux-android-addr2line.exe -f -C -e C:\Users\jisufeichi\Desktop\symbols\arm64-v8a\libunity.sym.so 0x032cf78 0x032e1a4 0x032fe70 0x0092694
解析结果:

在这里插入图片描述

文章来源:https://blog.csdn.net/qq_15057213/article/details/135646376
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。