产品推广后不出意外的会收到用户的bug反馈,为了保证用户体验,提高产品的质量,集成UMeng后即可在UMeng上查看项目基本使用情况。产品要求在“影响用户/活跃用户”的这一数据上要保证低于1%,并且要经常查看并与后台交流排除crash。T.T
直接看两种crash排除吧~
1."Application received signal SIGSEGV"错误详情
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.右键显示包内容进入dSYMs文件夹,找到.dSYM文件
3.然后通过Terminal工具跳转到.dSYM文件
$ cd ~/Library/Developer/Xcode/Archives/yyyy-mm-dd/appname.xcarchive/dSYMs/appname.app.dSYM
4.通过ls与cd指令进入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.根据处内存地址反编译找到源码行
$ atos -arch arm64 -o appname 0x********
注意:
1.如果定位到的地址是UmengSignalHandler,这不是错误,是捕捉crash的方法,本身不引起crash, 当crash发生时由它来捕捉,直接忽略crash log中的 UmengSignalHandler
2.appname全部为项目名, arm64位对应的CPU Type
2.其他错误
*** -[__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
解决方法
方法一:根据提示的错误信息在工程中find
方法二:参考错误类型一