產(chǎn)品推廣后不出意外的會收到用戶的bug反饋,為了保證用戶體驗(yàn)矾瑰,提高產(chǎn)品的質(zhì)量砖茸,集成UMeng后即可在UMeng上查看項(xiàng)目基本使用情況。產(chǎn)品要求在“影響用戶/活躍用戶”的這一數(shù)據(jù)上要保證低于1%殴穴,并且要經(jīng)常查看并與后臺交流排除crash凉夯。T.T
直接看兩種crash排除吧~
1."Application received signal SIGSEGV"錯(cuò)誤詳情
Application received signal SIGSEGV
(null)
((
0 CoreFoundation 0x0000000182f29918 <redacted> + 148
1 libobjc.A.dylib 0x0000000182597f80 objc_exception_throw + 56
2 CoreFoundation 0x0000000182f29848 <redacted> + 0
3 appname 0x10024fdbc appname + 2424252
4 libsystem_platform.dylib 0x0000000182b8d93c _sigtramp + 52
5 appname 0x1001aca54 appname + 1755732
6 libdispatch.dylib 0x000000018297d630 <redacted> + 24
7 libdispatch.dylib 0x000000018297d5f0 <redacted> + 16
8 libdispatch.dylib 0x0000000182982cf8 _dispatch_main_queue_callback_4CF + 1844
9 CoreFoundation 0x0000000182ee0bb0 <redacted> + 12
10 CoreFoundation 0x0000000182edea18 <redacted> + 1628
11 CoreFoundation 0x0000000182e0d680 CFRunLoopRunSpecific + 384
12 GraphicsServices 0x000000018431c088 GSEventRunModal + 180
13 UIKit 0x0000000187c84d90 UIApplicationMain + 204
14 appname 0x10019299c appname + 1649052
15 libdyld.dylib 0x00000001829ae8b8 <redacted> + 4
)
dSYM UUID: 6DEB7E59-FC6A-30C2-8A16-B06BD00C4FD5
CPU Type: arm64
Slide Address: 0x0000000100000000
Binary Image: appname
Base Address: 0x00000001000ec000
解決方法
1.找到之前上傳到AppStore的.xcarchive文件货葬,XCode->Window->Orgainize,右鍵在Finder中顯示
2.右鍵顯示包內(nèi)容進(jìn)入dSYMs文件夾劲够,找到.dSYM文件
3.然后通過Terminal工具跳轉(zhuǎn)到.dSYM文件
$ cd ~/Library/Developer/Xcode/Archives/yyyy-mm-dd/appname.xcarchive/dSYMs/appname.app.dSYM
4.通過ls與cd指令進(jìn)入DWARF路徑
kermitdeMacBook-Air:appname.app.dSYM kermit$ ls
Contents
kermitdeMacBook-Air:appname.app.dSYM kermit$ cd contents
kermitdeMacBook-Air:contents kermit$ ls
Info.plist Resources
kermitdeMacBook-Air:contents kermit$ cd resources
kermitdeMacBook-Air:resources kermit$ ls
DWARF
kermitdeMacBook-Air:resources kermit$ cd dwarf
kermitdeMacBook-Air:dwarf kermit$ ls
appname
5.根據(jù)處內(nèi)存地址反編譯找到源碼行
$ atos -arch arm64 -o appname 0x********
注意:
1.如果定位到的地址是UmengSignalHandler震桶,這不是錯(cuò)誤,是捕捉crash的方法征绎,本身不引起crash蹲姐, 當(dāng)crash發(fā)生時(shí)由它來捕捉,直接忽略crash log中的 UmengSignalHandler
2.appname全部為項(xiàng)目名人柿, arm64位對應(yīng)的CPU Type
2.其他錯(cuò)誤
*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
(null)
((
0 CoreFoundation 0x000000018323edc8 <redacted> + 148
1 libobjc.A.dylib 0x00000001828a3f80 objc_exception_throw + 56
2 CoreFoundation 0x000000018312777c <redacted> + 324
3 CoreFoundation 0x0000000183127614 <redacted> + 64
4 appname 0x100193558 appname + 1652056
5 UIKit 0x000000018864b1b8 <redacted> + 228
6 UIKit 0x000000018871b6d4 <redacted> + 128
7 UIKit 0x000000018864b080 <redacted> + 100
8 UIKit 0x000000018864b604 <redacted> + 700
9 UIKit 0x000000018865ba80 <redacted> + 448
10 UIKit 0x000000018864570c <redacted> + 152
11 UIKit 0x0000000188645394 <redacted> + 712
12 FrontBoardServices 0x0000000184bdf7ac <redacted> + 36
13 FrontBoardServices 0x0000000184bdf618 <redacted> + 168
14 FrontBoardServices 0x0000000184bdf9c8 <redacted> + 56
15 CoreFoundation 0x00000001831f509c <redacted> + 24
16 CoreFoundation 0x00000001831f4b30 <redacted> + 540
17 CoreFoundation 0x00000001831f2830 <redacted> + 724
18 CoreFoundation 0x000000018311cc50 CFRunLoopRunSpecific + 384
19 GraphicsServices 0x0000000184a04088 GSEventRunModal + 180
20 UIKit 0x0000000188406088 UIApplicationMain + 204
21 appname 0x10019637c appname + 1663868
22 libdyld.dylib 0x0000000182cba8b8 <redacted> + 4
)
dSYM UUID: 18968DAD-71C9-3746-8262-1F15532042B7
CPU Type: arm64
Slide Address: 0x0000000100000000
Binary Image: appname
Base Address: 0x0000000100074000
解決方法
方法一:根據(jù)提示的錯(cuò)誤信息在工程中find
方法二:參考錯(cuò)誤類型一