super1 发表于 2022-6-16 15:34

Unity il2cpp Android 查看 Crash堆栈

在Firebas或者Bugly等一些崩溃日志,亦或者有一些android机器log中的crash日志,往往以一种堆栈的形式展现。
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000706c74f3f0*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***Build fingerprint: 'google/redfin/redfin:11/RQ3A.211001.001/7641976:user/release-keys'Revision: 'MP1.0'pid: 32417, tid: 32500, name: UnityMain>>> com.xxx.xxx.xxx <<<    x0   b40000706c74f2e0x1   0000000000103000x2   0000000000000001x3   000000706c2a9578    x4   000000706c2a9530x5   0000000000000004x6   622f737465737361x7   617461442f6e6962    x8   0000000000000000x9   0000007061ef4000x100000000000004000x110000000000007ef4    x12000000000014afd0x13a428000000fc0100x140000000000008000x150000000000000001    x160000007061e50818x1700000073760f6d68x18000000706c2a9514x19b40000706c74f2e0    x200000000000000000x21b400007254699eb0x22000000706c2ab000x23b400007254699f68    x2400000070c8981af8x25000000706c2ab000x26000000000000000bx270000000000000001    x280000000000000000x29000000706c2a96b0x300000007060fc3218    sp   000000706c2a9650pc   0000007060fc7bd0pstate 0000000060001000backtrace:    #00pc 000000000033ccd8/data/app/~~WVNFp6HzpKWuierMUyvmig==/com.cyou.freestyle2.gp-L9mKcI-dGqrOh7aLnki7Wg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libunity.so    #01pc 0000000000361384/data/app/~~WVNFp6HzpKWuierMUyvmig==/com.cyou.freestyle2.gp-L9mKcI-dGqrOh7aLnki7Wg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libunity.so    #02pc 0000000000004db4/system/bin/app_process64 #03pc 00000000000005c0 (__kernel_rt_sigreturn)    #04pc 0000000000360bd0/data/app/~~WVNFp6HzpKWuierMUyvmig==/com.cyou.freestyle2.gp-L9mKcI-dGqrOh7aLnki7Wg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libunity.so    #05pc 000000000035c218/data/app/~~WVNFp6HzpKWuierMUyvmig==/com.cyou.freestyle2.gp-L9mKcI-dGqrOh7aLnki7Wg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libunity.so    #06pc 00000000000504f0/data/app/~~WVNFp6HzpKWuierMUyvmig==/com.cyou.freestyle2.gp-L9mKcI-dGqrOh7aLnki7Wg==/oat/arm64/base.odex......
查看这种堆栈的具体信息就需要用到符号表。
NDK:D:\NDK\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin\aarch64-linux-android-addr2line.exe
SO:"D:\Unity 20xx.x.xx\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\Symbols\arm64-v8a\libunity.sym.so"
Address:000000000033ccd8 0000000000361384 ...
{NDK} -f -C -e {SO} {Address}unwind_backtrace_signal_arch(siginfo*, void*, map_info const*, backtrace_frame_t*, unsigned long, unsigned long)??:?NativeRuntimeException::signal_handler(int, siginfo*, void*)??:?????:0????:0NativeRuntimeException::CatchAndRethrow()??:?nativeDone(_JNIEnv*, _jobject*)??:?????:0
就能查看一些具体信息,但是也只能到c++层。 但是定位不到到具体的unity代码和行数。
页: [1]
查看完整版本: Unity il2cpp Android 查看 Crash堆栈