使用symbolicatecrash分析
通過(guò)命令find /Applications/Xcode.app -name symbolicatecrash -type f
找到真機(jī)的symbolicatecrash
, 然后通過(guò)設(shè)置環(huán)境變量,這樣就可以全局訪問(wèn)蔫缸。
/Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash // 模擬器
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash // 真機(jī)
分析文件
將xx.crash和xx.dSYM文件放在一個(gè)文件里巩搏,然后通過(guò)命令解析
symbolicatecrash *.crash *.dSYM > crash.log
如果遇到Error: "DEVELOPER_DIR" is not defined at /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources//symbolicatecrash line 69.
需要配置
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
問(wèn)題類型
1.訪問(wèn)越界
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x2000000011deb438
VM Region Info: 0x2000000011deb438 is not in any region. Bytes after previous region: 2305842998239212601
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END