问题是,当PLCrashReporter报告的符号化堆栈跟踪地址没有返回实际的系统框架/库符号行时。我的申请线虽然显示了符号化的正确违规行。Atos没有正确描述系统框架/库
一些配置。我在我的OSX 10.9.5上安装了Xcode 5.1.1和Xcode 6.0.1。
当使用Xcode 5.1.1并检查设备日志时,虽然在崩溃报告中没有符号可以发生崩溃,但我可以看到崩溃。
使用Xcode 6.0.1崩溃我的应用程序并检查设备日志我可以看到报告符号正确。
Atos在任何情况下都不会返回正确的Apple系统框架/库符号行。它只是返回与相应的框架/库无关的垃圾类。见下面的例子。
详细说明我使用PLCrashReporter向我报告的崩溃堆栈跟踪以及与设备日志符号化报告进行比较。
下面是使用PLCrashReporter unsymbolicated栈跟踪报告:
0 libsystem_platform.dylib 0x000000019726ce5c 0x197268000 + 20060
1 libsystem_c.dylib 0x00000001971253e0 0x197124000 + 5088
2 MyNewPlugin 0x000000010003ac70 0x10002c000 + 60528
3 UIKit 0x000000018d5f90b0 0x18d5b0000 + 299184
4 UIKit 0x000000018d5f9044 0x18d5b0000 + 299076
5 UIKit 0x000000018d5e2520 0x18d5b0000 + 206112
6 UIKit 0x000000018d5f8a44 0x18d5b0000 + 297540
7 UIKit 0x000000018d5f86d8 0x18d5b0000 + 296664
8 UIKit 0x000000018d5f3370 0x18d5b0000 + 275312
9 UIKit 0x000000018d5c4b50 0x18d5b0000 + 84816
10 UIKit 0x000000018d5c2c40 0x18d5b0000 + 76864
11 CoreFoundation 0x000000018a5bb7f4 0x18a4f0000 + 833524
12 CoreFoundation 0x000000018a5bab50 0x18a4f0000 + 830288
13 CoreFoundation 0x000000018a5b8de8 0x18a4f0000 + 822760
14 CoreFoundation 0x000000018a4f9dd0 0x18a4f0000 + 40400
15 GraphicsServices 0x00000001901e1c0c 0x1901d4000 + 56332
16 UIKit 0x000000018d62afc4 0x18d5b0000 + 503748
17 MyNewPlugin 0x0000000100041944 0x10002c000 + 88388
18 libdyld.dylib 0x00000001970f7aa0 0x1970f4000 + 15008
这里是上面的栈跟踪从PLCrashReported使用 “xcrun ATOS” symbolicated:
0 libsystem_platform.dylib _mh_execute_header (in MyNewPlugin) + 20060
1 libsystem_c.dylib _mh_execute_header (in MyNewPlugin) + 5088
2 MyNewPlugin -[SLKViewController causeBadAddress:] (in MyNewPlugin) (SLKViewController.m:175) + 60528
3 UIKit __30-[RequestWorker logEvent:]_block_invoke (in MyNewPlugin) + 232
4 UIKit __30-[RequestWorker logEvent:]_block_invoke (in MyNewPlugin) + 124
5 UIKit +[SSNetworkInfo cellMACAddress] (in MyNewPlugin) (SSNetworkInfo.m:0)
6 UIKit __copy_helper_block_234 (in MyNewPlugin) + 100
7 UIKit -[RequestWorker logEventAsyncWithName:logLevel:andCompletionBlock:] (in MyNewPlugin) + 992
8 UIKit -[ErrorResponse setData:] (in MyNewPlugin) + 56
9 UIKit +[SSProcessInfo processStatus] (in MyNewPlugin) (SSProcessInfo.m:97)
10 UIKit +[JSONModel(Networking) postModel:toURLWithString:completion:] (in MyNewPlugin) (JSONModel+networking.m:107)
11 CoreFoundation __55+[SPLJSONKeyMapper mapperFromUnderscoreCaseToCamelCase]_block_invoke_2 (in MyNewPlugin) + 1132
12 CoreFoundation __destroy_helper_block_17 (in MyNewPlugin) + 44
13 CoreFoundation -[RequestWorker sendUnhandledRequestAsync:andResultBlock:] (in MyNewPlugin) + 240
14 CoreFoundation +[SSApplicationInfo clipboardContent] (in MyNewPlugin) (SSApplicationInfo.m:49)
15 GraphicsServices __47-[SLKViewController logExceptionSynchronously:]_block_invoke (in MyNewPlugin) (SLKViewController.m:92) + 56332
16 UIKit -[DeviceInfo appendInfo] (in MyNewPlugin) + 1192
17 MyNewPlugin main (in MyNewPlugin) (main.m:16) + 88388
18 libdyld.dylib _mh_execute_header (in MyNewPlugin) + 15008
这里是上述相同的堆栈跟踪来自设备对象的精确碰撞符号化:
0 libsystem_platform.dylib 0x000000019726ce5c _platform_memmove + 188
1 libsystem_c.dylib 0x00000001971253dc strcpy + 40
2 MyNewPlugin 0x000000010003ac6c -[SLKViewController causeBadAddress:] (SLKViewController.m:174)
3 UIKit 0x000000018d5f90ac -[UIApplication sendAction:to:from:forEvent:] + 96
4 UIKit 0x000000018d5f9040 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 20
5 UIKit 0x000000018d5e251c -[UIControl _sendActionsForEvents:withEvent:] + 372
6 UIKit 0x000000018d5f8a40 -[UIControl touchesEnded:withEvent:] + 580
7 UIKit 0x000000018d5f86d4 -[UIWindow _sendTouchesForEvent:] + 688
8 UIKit 0x000000018d5f336c -[UIWindow sendEvent:] + 1168
9 UIKit 0x000000018d5c4b4c -[UIApplication sendEvent:] + 252
10 UIKit 0x000000018d5c2c3c _UIApplicationHandleEventQueue + 8496
11 CoreFoundation 0x000000018a5bb7f0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
12 CoreFoundation 0x000000018a5bab4c __CFRunLoopDoSources0 + 252
13 CoreFoundation 0x000000018a5b8de4 __CFRunLoopRun + 628
14 CoreFoundation 0x000000018a4f9dcc CFRunLoopRunSpecific + 448
15 GraphicsServices 0x00000001901e1c08 GSEventRunModal + 164
16 UIKit 0x000000018d62afc0 UIApplicationMain + 1152
17 MyNewPlugin 0x0000000100041940 main (main.m:16)
18 libdyld.dylib 0x00000001970f7a9c start + 0
您可以看到两个符号化堆栈跟踪,第一个来自PLCrashReporter堆栈跟踪,第二个来自Xcode设备日志。我想在这一点上说,我不相信这是有问题的地址,但更多的事情正在与atos进行。 Xcode是否使用symboliccrash工具来表示Apple报告?
atos命令:xcrun atos -arch arm64 -o MyNewPlugin.app.dSYM/Contents/Resources/DWARF/MyNewPlugin -l 0x197268000 0x000000019726ce5c
将导致_mh_execute_header (in MyNewPlugin) + 20060
这是完全错误的,它应该返回类似设备日志报告_platform_memmove + 188
。
另一个ATOS例子来证明这个问题的线3 xcrun atos -arch arm64 -o MyNewPlugin.app.dSYM/Contents/Resources/DWARF/MyNewPlugin -l 0x18d5b0000 0x000000018d5f90b0
, 应该返回,UIKit 0x000000018d5f90ac -[UIApplication sendAction:to:from:forEvent:] + 96
, 而是返回,UIKit __30-[RequestWorker logEvent:]_block_invoke (in MyNewPlugin) + 232
其中有无关的UIKit,这是一个内部类我使用。
这是我如何使用PLCrashReporter创建堆栈跟踪的行。
[NSString stringWithFormat:@"%-4ld%@ 0x0000000%" PRIx64 " 0x%" PRIx64 " + %" PRId64 "", (long)frameIndex, imageName, frameInfo.instructionPointer, baseAddress, pcOffset];
编辑: 在终端的unsymbolicated苹果崩溃报告使用symbolicatecrash是symbolicating所有系统组件,但不应用线!
你有没有解决过你的问题? – Locksleyu 2014-10-15 12:38:04
不,不幸的是,我没有,atos只是没用,或者我错过了在哪里找不到任何地方的信息! – 2014-10-15 14:37:05