gpt4 book ai didi

iphone - 如何读取堆栈跟踪错误崩溃报告

转载 作者:行者123 更新时间:2023-12-03 21:05:10 26 4
gpt4 key购买 nike

假设我有以下内容(来自 TestFlight):

0 MyApp 0x000ef881 MyApp + 395393
1 MyApp 0x000efc97 MyApp + 396439
2 libsystem_c.dylib 0x37dc6539 _sigtramp + 48
3 MyApp 0x00093e51 MyApp + 20049
4 Foundation 0x338fd943 __NSFireDelayedPerform + 414
5 CoreFoundation 0x36daea63 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
6 CoreFoundation 0x36dae6c9 __CFRunLoopDoTimer + 364
7 CoreFoundation 0x36dad29f __CFRunLoopRun + 1206
8 CoreFoundation 0x36d304dd CFRunLoopRunSpecific + 300
9 CoreFoundation 0x36d303a5 CFRunLoopRunInMode + 104
10 GraphicsServices 0x32a0bfed GSEventRunModal + 156
11 UIKit 0x319e0743 UIApplicationMain + 1090
12 MyApp 0x00091dcf MyApp + 11727
13 MyApp 0x00091d58 MyApp + 11608

这是一个更长的:

0 MyApp 0x00077881 MyApp + 395393
1 MyApp 0x00077c97 MyApp + 396439
2 libsystem_c.dylib 0x37e32539 _sigtramp + 48
3 UIKit 0x31a206e7 -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 178
4 UIKit 0x31a207a5 -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 368
5 UIKit 0x31a207a5 -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 368
6 UIKit 0x31a212df -[UIView(Internal) _addSubview:positioned:relativeTo:] + 334
7 UIKit 0x31a2118b -[UIView(Hierarchy) addSubview:] + 30
8 UIKit 0x31ab8d79 -[UITransitionView transition:fromView:toView:] + 980
9 UIKit 0x31b0198f -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4842
10 UIKit 0x31b5b461 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 1732
11 UIKit 0x31abeaf1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
12 MyApp 0x00019e73 MyApp + 11891
13 MyApp 0x0002c3c3 MyApp + 86979
14 Foundation 0x3395d50f __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 18
15 CoreFoundation 0x36e12577 ___CFXNotificationPost_block_invoke_0 + 70
16 CoreFoundation 0x36d9e0cf _CFXNotificationPost + 1406
17 Foundation 0x338d13fb -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
18 Foundation 0x338d2c2b -[NSNotificationCenter postNotificationName:object:] + 30
19 MyApp 0x0002dd69 MyApp + 93545
20 MyApp 0x00023a5b MyApp + 51803
21 MyApp 0x0002425d MyApp + 53853
22 MyApp 0x0001a5c1 MyApp + 13761
23 UIKit 0x31bcdbc7 -[UIApplication _applicationOpenURL:payload:] + 270
24 UIKit 0x31afaa51 -[UIApplication _callApplicationResumeHandlersForURL:payload:] + 104
25 UIKit 0x31afa30d -[UIApplication _handleApplicationResumeEvent:] + 1496
26 UIKit 0x31a1e961 -[UIApplication handleEvent:withNewEvent:] + 1080
27 UIKit 0x31a1e3bf -[UIApplication sendEvent:] + 54
28 UIKit 0x31a1dd2d _UIApplicationHandleEvent + 5808
29 GraphicsServices 0x32a78e13 PurpleEventCallback + 882
30 CoreFoundation 0x36e1a553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
31 CoreFoundation 0x36e1a4f5 __CFRunLoopDoSource1 + 140
32 CoreFoundation 0x36e19343 __CFRunLoopRun + 1370
33 CoreFoundation 0x36d9c4dd CFRunLoopRunSpecific + 300
34 CoreFoundation 0x36d9c3a5 CFRunLoopRunInMode + 104
35 GraphicsServices 0x32a77fed GSEventRunModal + 156
36 UIKit 0x31a4c743 UIApplicationMain + 1090
37 MyApp 0x00019dcf MyApp + 11727
38 MyApp 0x00019d58 MyApp + 11608

现在我很困惑这个错误是什么?任何想法?或者也许教程可以帮助我如何以更人性化的方式阅读本文?

最佳答案

您需要在 TestFlight 中对崩溃报告进行符号化。转到 TestFlight 中的“构建崩溃”页面,您应该在顶部看到一个用于放置压缩的 dSYM 文件的区域。进入 Xcode 4 并运行 Organizer,您可以通过Window > Organizer 菜单来执行此操作。点击顶部的存档按钮。右键单击(Control+左键单击)您上传到 TestFlight 的版本,然后选择在 Finder 中显示。右键单击 *.xarchive 文件并选择显示包内容。现在进入dSYMs目录并右键单击.dSYM文件(例如MyApp.app.dSYM)并选择压缩“MyApp.app.dSYM”

现在,将此压缩的 dSYM 文件拖到 TestFlight Build Crashes 页面中需要该文件的部分。这会将文件上传到 TestFlight 并表示该构建的崩溃日志。有时需要几分钟,但最终您的崩溃报告应该更有意义。

在崩溃日志中查找专门提到您的应用程序的堆栈帧,以拼凑发生的情况。最后,您应该会在崩溃日志中看到一条您认识的消息或符号。如果幸运的话,该行的末尾应该包含类文件的名称以及发生崩溃的文件内的行号。在开始看到系统崩溃并报告错误之前,您正在寻找代码运行的最后一个方法。使用崩溃报告中指定位置的代码以及系统崩溃时报告的错误消息,您应该能够确定原因或为您指明正确方向的信息。

关于iphone - 如何读取堆栈跟踪错误崩溃报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8004975/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com