ios - 我的 iOS 应用程序持续崩溃,无法找到它

标签 ios crash crash-reports symbolicatecrash crittercism

我在 5 天前搜索有关此崩溃的信息,但我可以找到我的应用程序有时崩溃的原因。 我正在使用 Crittercism 库来记录我的崩溃。 dSYM 文件已正确上传到 Crittercism 网站上。这是来自 Crittercism 的崩溃日志:

 0 libobjc.A.dylib 0x38540626 objc_msgSend + 6
 1 UIKit 0x307baaf7 -[_UIModalItemsCoordinator _notifyDelegateModalItem:tappedButtonAtIndex:] + 95
 2 UIKit 0x307ba96d -[_UIModalItemAlertContentView tableView:didSelectRowAtIndexPath:] + 749
 3 UIKit 0x306c205f -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1079
 4 UIKit 0x30774377 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 215
 5 UIKit 0x306236f5 _applyBlockToCFArrayCopiedToStack + 317
 6 UIKit 0x3059c55b _afterCACommitHandler + 431
 7 CoreFoundation 0x2dd532a5 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
 8 CoreFoundation 0x2dd50c49 __CFRunLoopDoObservers + 285
 9 CoreFoundation 0x2dd50f8b __CFRunLoopRun + 731
 10 CoreFoundation 0x2dcbbf0f CFRunLoopRunSpecific + 523
 11 CoreFoundation 0x2dcbbcf3 CFRunLoopRunInMode + 107
 12 GraphicsServices 0x32bc0663 GSEventRunModal + 139
 13 UIKit 0x3060716d UIApplicationMain + 1137
 14 myApp 0x000c3357 main (main.m:16)
 15 libdyld.dylib 0x38a43ab7 start + 3

问题是:我的应用程序中有很多 UITableView。但我找不到它是哪一个。 我必须如何处理才能调试此崩溃?我在苹果开发者中心没有找到一些有用的信息。我尝试使用atos命令来符号化该文件,但没有有用的信息。这与 Crittercism 网站上的信息完全相同。

这里是我使用的命令:atos -arch armv7 -o myApp(进入交互模式,然后输入每个内存地址,如:0x307baaf7) 我只有 myApp.app.dSYM 存档,要使用此命令(如上),我使用了以下路径的存档文件:Contents/Resources/DWARF/myApp

我真的迷路了。任何想法 ?建议?非常感谢您的帮助。

编辑1:

我已经检查了我所有的 UIAletView 和 UIAlertView 的委托(delegate):一切正常。

我在 Crittercism 上看到了崩溃日志(63 名用户在 iOS 7、iPhone 和 iPad 上大约有 120 次崩溃)。 我无法复制它!我真的不明白。

最佳答案

Frame 14 already shows the correct symbol, which is main.m line 16. Using atos with the address as written in the stackframe like you did is wrong, see this stackoverflow explanation. As such it is not possible for a crash report to tell you which table view is causing such a memory issue.

基于以上所述,您可能无法从堆栈跟踪本身获得准确的 TableView ,但使用 Crittercism还有其他功能(例如 Breadcrumbs )允许捕获堆栈之外的踪迹。

我的建议是在 TableViewController 的 viewDidLoad 中添加一个面包屑,并在那里获取/定义 TableView 的名称。这样您就可以逐步浏览面包屑,并知道导致崩溃的原因是您在此表格 View 中。

这应该有助于您将来更好地捕捉这种情况。

至于这个特定的堆栈跟踪。您可能会使用此 post 中描述的技术帮助您更好地了解 objc_msgSend 的真正来源。

关于ios - 我的 iOS 应用程序持续崩溃,无法找到它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24308781/

相关文章:

ios - NSDirectoryEnumerator 迭代元素无法比较后缀

ios - Sirikit 自定义意图和 iOS 13.4.1 的国际化问题

iphone - popViewController动画:YES crashes my app

objective-c - 在当前参数寄存器 0x​​104567911 中找到的选择器名称

ios - 应用程序在 runTransitionForCurrentState 上崩溃,但不知道为什么

ios - Google Analytics SDK 3 iOS - Google 的示例不起作用?

java - 当我运行简单的 android studio 应用程序时,它崩溃了。它没有错误

c++ - 替换或修改外部应用程序中的 API 调用(GetOpenFileName、GetSaveFileName)

iphone - 名称为 SIGSEGV 且原因为 main 的 iOS 崩溃

ios - MVVMCross 应用程序中的自定义导航 Controller