1.找到crash log信息:xcode->windows->Devices and Simulators->View Device logs->This Device
1.找到crash log信息:xcode->windows->Devices and Simulators->View Device logs->This Device Incident Identifier: C73A4009-8127-45AD-804D-4C68D935D645 CrashReporter Key: 18d3cab8e0db5e15f6f34ec7631ef2255f3041aa Hardware Model: iPhone8,1 Process: 虚拟逛店UAT [3138] Path: /private/var/containers/Bundle/Application/C969D23B-0F46-4B4E-B271-804252D641BF/虚拟逛店UAT.app/虚拟逛店UAT Identifier: com.redstar.VirtualShopUAT Version: 1 (1.2.0) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.redstar.VirtualShopUAT [1928] Date/Time: 2020-05-30 18:00:21.1143 +0800 Launch Time: 2020-05-30 17:10:13.9887 +0800 OS Version: iPhone OS 12.3.1 (16F203) Baseband Version: 5.60.01 Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x00000001866f2024 Triggered by Thread: 0 Application Specific Information: BUG IN CLIENT OF LIBPLATFORM: Trying to recursively lock an os_unfair_lock Abort Cause 771 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_platform.dylib 0x00000001866f2024 _os_unfair_lock_recursive_abort + 36 1 libsystem_platform.dylib 0x00000001866f3374 _os_unfair_lock_lock_slow + 264 2 libobjc.A.dylib 0x0000000185cd9270 objc_object::sidetable_clearDeallocating+ 127600 () + 104 3 libobjc.A.dylib 0x0000000185cce700 objc_destructInstance + 140 4 libsystem_blocks.dylib 0x0000000186580a54 _Block_release + 168 5 虚拟逛店UAT 0x0000000102ac0850 0x1026dc000 + 4081744 6 虚拟逛店UAT 0x0000000102ab98f0 0x1026dc000 + 4053232 7 虚拟逛店UAT 0x0000000102a8cfac 0x1026dc000 + 3870636 8 虚拟逛店UAT 0x0000000102a89760 0x1026dc000 + 3856224 9 libsystem_platform.dylib 0x00000001866f59ec _sigtramp + 56 10 libsystem_kernel.dylib 0x000000018667a924
2.下载工具restore-symbol,在终端执行
git clone --recursive https://github.com/tobefuturer/restore-symbol.git
下载成功之后运行,然后执行
cd restore-symbol && make
3.解析bug位置
1.找到项目中的.app文件,Frameworks或者Products内,拷贝到restore-symbol文件夹内;
2.然后终端执行会生成一个虚拟逛店UAT-symbol文件;
./restore-symbol -o 虚拟逛店UAT-symbol 虚拟逛店UAT
3.定位具体bug位置,此时架构师arm64,0x1026dc000是基址
atos -arch arm64 -o 虚拟逛店UAT-symbol -l 0x1026dc000 0x00000001028aa384 0x00000001028a9b20 0x00000001028ac9c0 0x00000001028ab91c 0x00000001028af90c 0x00000001028d3644