Hello,村长🙂

1、崩溃信息

1.1 Loading.Preload 线程

E/DEBUG: Activity: (none)
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: um_app_key: 【appid】
E/DEBUG: um_app_channel: xiaomi
E/DEBUG: um_os: android
E/DEBUG: um_crash_sdk_version: 1.3.1
E/DEBUG: um_umid_header: 【header】
E/DEBUG: um_app_carrier:
E/DEBUG: um_access: wifi
E/DEBUG: um_network_type: 0
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: maps:
E/DEBUG: fault addr 0000000000000369 not in maps
E/DEBUG: total lines: 4755, matched 1800 lines, write 1800 lines.
E/DEBUG: total address size: 40223580 kB
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: Process Name: 【包名】
E/DEBUG: Thread Name: 'Loading.Preload'
E/DEBUG: pid: 4927, tid: 5685 >>> 【包名】 <<<
E/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000369
E/DEBUG: x0 0000000000000000 x1 0000000000000000 x2 0000000000000040 x3 0000000000000003
E/DEBUG: x4 000000702c4fa860 x5 0000000003787d30 x6 731f64716e6c1f6c x7 7f7f7f7f7f7f7f7f
E/DEBUG: x8 0000000000000001 x9 54ef82594dd16bd7 x10 0000000000000001 x11 0000000000000001
E/DEBUG: x12 000000702c4fab30 x13 000000000000004d x14 000000702c4fabe0 x15 000005ae4fe301eb
E/DEBUG: x16 0000007135bd2960 x17 00000074f64224e4 x18 00000000c1f5bc1c x19 0000007135bfec40
E/DEBUG: x20 0000006fdb1ad1d0 x21 0000007135bfece8 x22 000000000000006d x23 0000007135bee090
E/DEBUG: x24 0000000000000010 x25 000000000000002a x26 000000000000002a x27 0000007135bef8c6
E/DEBUG: x28 0000000000000018 x29 0000000000003234 x30 000000713529d35c
E/DEBUG: sp 000000702c4fc580 pc 000000713529d3a4 pstate 0000000060001000
E/DEBUG: v0 00000000000000000000000000000000 v1 000000000a0a29303231203a656e694c
E/DEBUG: v2 00000000000000000000000000000000 v3 00000000000000000000000000000000
E/DEBUG: v4 8060180000000000806018067f9f0000 v5 00000000000000000000000000000000
E/DEBUG: v6 000000000000000000000000ffff0000 v7 80601806806018068060180680601806
E/DEBUG: v8 00000000000000000000000000000000 v9 00000000000000000000000000000000
E/DEBUG: v10 00000000000000000000000000000000 v11 00000000000000000000000000000000
E/DEBUG: v12 00000000000000000000000000000000 v13 00000000000000000000000000000000
E/DEBUG: v14 00000000000000000000000000000000 v15 00000000000000000000000000000000
E/DEBUG: v16 c0300c03c0300c03c0300c03c0300c03 v17 a0080000a00a5000a800aa5000000000
E/DEBUG: v18 80200800000000008020080240100000 v19 00000000000000000000001b0000001b
E/DEBUG: v20 00000000000000004949494848484847 v21 000000000000000090908f8f8e8e8d8c
E/DEBUG: v22 00000000000000001c1c1b1b1b1b1b1b v23 00000000000000000093009200920091
E/DEBUG: v24 00000000000000000000008f0000008f v25 0000000000000000008e008e008d008c
E/DEBUG: v26 00000000000000000000009400000093 v27 00000000000000000000002000000007
E/DEBUG: v28 00000000000000000000001000000008 v29 00000000000000000000003000000009
E/DEBUG: v30 0000000000000000000000080000000c v31 0075006f00720020005400420020002c
E/DEBUG: fpsr 0000001a fpcr 00000000
E/DEBUG: #00 pc 000000000066a3a4 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #01 pc 0000000000669f44 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #02 pc 0000000000669e94 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #03 pc 00000000001d1184 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #04 pc 00000000002cfd80 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #05 pc 00000000003521f4 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #06 pc 000000000035204c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #07 pc 000000000034d35c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #08 pc 000000000034b628 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #09 pc 000000000034c50c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #10 pc 000000000034bc8c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #11 pc 0000000000286ca4 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #12 pc 0000000000288974 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #13 pc 00000000002887c0 /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #14 pc 000000000028872c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #15 pc 00000000002df41c /data/app/~~b_3TstDXMOwZ5vCSkm_nzw==/【包名】-kcWb6zW72oV3LNR0lejt2w==/lib/arm64/libunity.so
E/DEBUG: #16 pc 00000000000799a4 /apex/com.android.runtime/lib64/bionic/libc.so (_ZL15__pthread_startPv+264)
E/DEBUG: #17 pc 000000000001619c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)
  • 利用带有符号表的 libunity.so 文件,根据 addr2line 查看堆栈

使用 aarch64-linux-android-addr2line 还是 arm-linux-androideabi-addr2line,根据当前设备 ABI 而定

地址转换得到的结果显示 UnitySendMessage,未果

aarch64-linux-android-addr2line -C -f -e libunity.so 000000000066a3a4
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000669f44
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000669e94
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000001d1184
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000002cfd80
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000674f40
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000006813d4
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000355d48
aarch64-linux-android-addr2line -C -f -e libunity.so 000000000034c5a0
aarch64-linux-android-addr2line -C -f -e libunity.so 000000000034cb80
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000287020
aarch64-linux-android-addr2line -C -f -e libunity.so 0000000000288974
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000002887c0
aarch64-linux-android-addr2line -C -f -e libunity.so 000000000028872c
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000002df41c
aarch64-linux-android-addr2line -C -f -e libunity.so 00000000000799a4
aarch64-linux-android-addr2line -C -f -e libunity.so 000000000001619c

unity 游戏在 Android12 上崩溃啦(小米12)_unity

1.2 UnityMain 线程

E/DEBUG: Activity: (none)
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: um_app_key: [appkey]
E/DEBUG: um_app_channel: xiaomi
E/DEBUG: um_os: android
E/DEBUG: um_crash_sdk_version: 1.5.2
E/DEBUG: um_umid_header: [略]
E/DEBUG: um_app_carrier:
E/DEBUG: um_access: wifi
E/DEBUG: um_network_type: 0
E/DEBUG: others_OS: Android
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: maps:
E/DEBUG: fault addr 00000000000003b1 not in maps
E/DEBUG: total lines: 4140, matched 1644 lines, write 1644 lines.
E/DEBUG: total address size: 38601868 kB
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: Process Name: '[包名]'
E/DEBUG: Thread Name: 'UnityMain'
E/DEBUG: pid: 27630, tid: 27678 >>> 【包名】 <<<
E/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000000003b1
E/DEBUG: x0 0000000000000000 x1 0000000000000000 x2 0000000000000040 x3 0000000000000003
E/DEBUG: x4 0000007411c3a160 x5 0000000000000000 x6 00000077cefcc000 x7 0000000000d679fa
E/DEBUG: x8 0000000000000001 x9 afc8339020171efd x10 0000000000000001 x11 0000000000000001
E/DEBUG: x12 0000007411c3a430 x13 000000000000004d x14 0000007411c3a4e0 x15 00005069bbea26eb
E/DEBUG: x16 000000740a6c2968 x17 00000077c2f034e4 x18 00000076d614403b x19 000000740a6ecfd0
E/DEBUG: x20 00000072edb69fc0 x21 000000740a6ed078 x22 0000000000000076 x23 000000740a6dc3d0
E/DEBUG: x24 0000000000000040 x25 000000000000001c x26 000000000000001c x27 000000740a6ddc06
E/DEBUG: x28 0000000000000018 x29 0000000000003234 x30 0000007409ca959c
E/DEBUG: sp 0000007411c3be80 pc 0000007409ca95e4 pstate 0000000060001000
E/DEBUG: v0 00000000000000000000000000000000 v1 000000000a0a29303231203a656e694c
E/DEBUG: v2 0000007411c3e000000000000000007b v3 00000000000000000000000000000000
E/DEBUG: v4 8060180000000000806018067f9f0000 v5 00000000000000000000000000000000
E/DEBUG: v6 000000000000000000000000ffff0000 v7 80601806806018068060180680601806
E/DEBUG: v8 00000000000000000000000000000000 v9 00000000000000000000000000000000
E/DEBUG: v10 00000000000000000000000000000000 v11 00000000000000000000000000000000
E/DEBUG: v12 00000000000000000000000000000000 v13 00000000000000000000000000000000
E/DEBUG: v14 00000000000000000000000000000000 v15 00000000000000000000000000000000
E/DEBUG: v16 c0300c03c0300c03c0300c03c0300c03 v17 a0080000a00a5000a800aa5000000000
E/DEBUG: v18 80200800000000008020080240100000 v19 7ffffffd7ffffffd7ffffffd7ffffffd
E/DEBUG: v20 00000000000000000000000000000000 v21 00000000000000000000000000000000
E/DEBUG: v22 ffffffffffffffffffffffffffffffff v23 00000000000000000000000000000000
E/DEBUG: v24 00000000000000000000800600008006 v25 00000000000000000000000100000000
E/DEBUG: v26 00000000000000000000000000000000 v27 00000000000000000000000000008006
E/DEBUG: v28 0000000000000000ffffffff00000000 v29 00000000000000000000000000000207
E/DEBUG: v30 000000000000000000001e0000001e00 v31 00000000000000003f80000000000000
E/DEBUG: fpsr 00000010 fpcr 00000000
E/DEBUG: #00 pc 00000000006985e4 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #01 pc 0000000000698184 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #02 pc 00000000006980d4 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #03 pc 00000000001ccbd0 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #04 pc 00000000002d4a44 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #05 pc 00000000008841d8 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #06 pc 0000000000882bec /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #07 pc 0000000000882a1c /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #08 pc 0000000000882748 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #09 pc 0000000000528288 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #10 pc 00000000005284c0 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #11 pc 0000000000389d2c /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #12 pc 0000000000377128 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #13 pc 0000000000377b7c /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #14 pc 000000000038b738 /data/app/~~2rxdX6U7je-qHYcOYoV1SA==/【包名】-jv6JpF2oXauBS_2kmSbmXg==/lib/arm64/libuni
E/DEBUG: #15 pc 0000000000022244 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148)
E/DEBUG: #16 pc 0000000000012520 /apex/com.android.art/lib64/libart.so (nterp_helper+4016)
E/DEBUG: #17 pc 00000000000115a4 /apex/com.android.art/lib64/libart.so (nterp_helper+52)
E/DEBUG: #18 pc 0000000000374c90 /system/framework/arm64/boot-framework.oat
E/DEBUG: --- --- --- ---
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: meminfo:
E/DEBUG: MemTotal: 5749924 kB
E/DEBUG: MemFree: 852116 kB
E/DEBUG: MemAvailable: 1977032 kB
E/DEBUG: Buffers: 2996 kB
E/DEBUG: Cached: 1201480 kB
E/DEBUG: SwapCached: 389332 kB
E/DEBUG: Active: 2119776 kB
E/DEBUG: Inactive: 955188 kB
E/DEBUG: Active(anon): 1539756 kB
E/DEBUG: Inactive(anon): 486584 kB
E/DEBUG: Active(file): 580020 kB
E/DEBUG: Inactive(file): 468604 kB
E/DEBUG: Unevictable: 120548 kB
E/DEBUG: Mlocked: 120548 kB
E/DEBUG: SwapTotal: 4194300 kB
E/DEBUG: SwapFree: 3384572 kB
E/DEBUG: Dirty: 39504 kB
E/DEBUG: Writeback: 0 kB
E/DEBUG: AnonPages: 1651760 kB
E/DEBUG: Mapped: 702640 kB
E/DEBUG: Shmem: 37012 kB
E/DEBUG: KReclaimable: 216176 kB
E/DEBUG: Slab: 383344 kB
E/DEBUG: SReclaimable: 82592 kB
E/DEBUG: SUnreclaim: 300752 kB
E/DEBUG: KernelStack: 88560 kB
E/DEBUG: PageTables: 161260 kB
E/DEBUG: NFS_Unstable: 0 kB
E/DEBUG: Bounce: 0 kB
E/DEBUG: WritebackTmp: 0 kB
E/DEBUG: CommitLimit: 7069260 kB
E/DEBUG: Committed_AS: 166533648 kB
E/DEBUG: VmallocTotal: 263061440 kB
E/DEBUG: VmallocUsed: 146152 kB
E/DEBUG: VmallocChunk: 0 kB
E/DEBUG: Percpu: 9216 kB
E/DEBUG: CmaTotal: 356352 kB
E/DEBUG: CmaFree: 0 kB
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: status:
E/DEBUG: Name: 【包名】
E/DEBUG: Umask: 0077
E/DEBUG: State: t (tracing stop)
E/DEBUG: Tgid: 27630
E/DEBUG: Ngid: 0
E/DEBUG: Pid: 27630
E/DEBUG: PPid: 853
E/DEBUG: TracerPid: 27979
E/DEBUG: Uid: 10265 10265 10265 10265
E/DEBUG: Gid: 10265 10265 10265 10265
E/DEBUG: FDSize: 512
E/DEBUG: Groups: 3003 9997 20265 50265
E/DEBUG: VmPeak: 38605452 kB
E/DEBUG: VmSize: 38601868 kB
E/DEBUG: VmLck: 0 kB
E/DEBUG: VmPin: 0 kB
E/DEBUG: VmHWM: 310512 kB
E/DEBUG: VmRSS: 308296 kB
E/DEBUG: RssAnon: 116164 kB
E/DEBUG: RssFile: 190568 kB
E/DEBUG: RssShmem: 1564 kB
E/DEBUG: VmData: 1547832 kB
E/DEBUG: VmStk: 8448 kB
E/DEBUG: VmExe: 16 kB
E/DEBUG: VmLib: 291084 kB
E/DEBUG: VmPTE: 2356 kB
E/DEBUG: VmSwap: 20316 kB
E/DEBUG: CoreDumping: 0
E/DEBUG: Threads: 180
E/DEBUG: SigQ: 0/20824
E/DEBUG: SigPnd: 0000000000000000
E/DEBUG: ShdPnd: 0000000000000000
E/DEBUG: SigBlk: 0000000080001200
E/DEBUG: SigIgn: 0000000000000001
E/DEBUG: SigCgt: 0000006e6080dcfe
E/DEBUG: CapInh: 0000000000000000
E/DEBUG: CapPrm: 0000000000000000
E/DEBUG: CapEff: 0000000000000000
E/DEBUG: CapBnd: 0000000000000000
E/DEBUG: CapAmb: 0000000000000000
E/DEBUG: NoNewPrivs: 0
E/DEBUG: Seccomp: 2
E/DEBUG: Speculation_Store_Bypass: thread vulnerable
E/DEBUG: Cpus_allowed: ff
E/DEBUG: Cpus_allowed_list: 0-7
E/DEBUG: Mems_allowed: 1
E/DEBUG: Mems_allowed_list: 0
E/DEBUG: voluntary_ctxt_switches: 593
E/DEBUG: nonvoluntary_ctxt_switches: 236
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: memory info:
E/DEBUG: JavaMax: 262144 kB
E/DEBUG: JavaTotal: 262144 kB
E/DEBUG: JavaFree: 226488 kB
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: limits:
E/DEBUG: Limit Soft Limit Hard Limit Units
E/DEBUG: Max cpu time unlimited unlimited seconds
E/DEBUG: Max file size unlimited unlimited bytes
E/DEBUG: Max data size unlimited unlimited bytes
E/DEBUG: Max stack size 8388608 unlimited bytes
E/DEBUG: Max core file size 0 unlimited bytes
E/DEBUG: Max resident set unlimited unlimited bytes
E/DEBUG: Max processes 20824 20824 processes
E/DEBUG: Max open files 32768 32768 files
E/DEBUG: Max locked memory 67108864 67108864 bytes
E/DEBUG: Max address space unlimited unlimited bytes
E/DEBUG: Max file locks unlimited unlimited locks
E/DEBUG: Max pending signals 20824 20824 signals
E/DEBUG: Max msgqueue size 819200 819200 bytes
E/DEBUG: Max nice priority 40 40
E/DEBUG: Max realtime priority 0 0
E/DEBUG: Max realtime timeout unlimited unlimited us
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
E/DEBUG: recent status:
E/DEBUG: last version: '1.0.5/release/84498b24'
E/DEBUG: generating anr: false
E/DEBUG: dumping all threads: false
E/DEBUG: --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

... ... 略

2、解决

根据大佬多年经验,再结合官网适配文档说明(如下),那就升级 unity 版本重新打包测试试探下,运行环境小米 12 (Android 12)

2.1 不闪退的版本:

目前验证的有这几个

unity 2019.4.33
unity 2019.4.19
unity 2020.3.2f1c1 (64-bit)

2.2 闪退的版本:

目前发现的版本有这几个

unity 2020.1.13

涉及 unity 引擎的是个盲区,就此记录下

unity 游戏在 Android12 上崩溃啦(小米12)_unity_02