objective-c - 在几乎没有信息的情况下调试 iPad 设备崩溃

标签 objective-c ipad debugging objective-c++

我从设备中提取的 iPad 崩溃中得到以下堆栈跟踪。这是从用户的 iPad 上提取的,我不知道当它崩溃时他们在做什么。我如何获得有关应用崩溃原因/崩溃位置的更多信息并修复它?

Uncaught C++ Exception
Stack trace:

   0 - 0   MyApp                               0x00005ac1 _Z16TerminateHandlerv + 24
   1 - 1   libstdc++.6.dylib                   0x33814e3d _ZN10__cxxabiv111__terminateEPFvvE + 52
   2 - 2   libstdc++.6.dylib                   0x33814e91 _ZSt9terminatev + 16
   3 - 3   libstdc++.6.dylib                   0x33814f61 __cxa_throw + 84
   4 - 4   libobjc.A.dylib                     0x3441dc8b objc_exception_throw + 70
   5 - 5   Foundation                          0x3645192b __NSThreadPerformPerform + 654
   6 - 6   CoreFoundation                      0x34e16a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
   7 - 7   CoreFoundation                      0x34e1875f __CFRunLoopDoSources0 + 382
   8 - 8   CoreFoundation                      0x34e194eb __CFRunLoopRun + 230
   9 - 9   CoreFoundation                      0x34da9ec3 CFRunLoopRunSpecific + 230
  10 - 10  CoreFoundation                      0x34da9dcb CFRunLoopRunInMode + 58
  11 - 11  GraphicsServices                    0x339d041f GSEventRunModal + 114
  12 - 12  GraphicsServices                    0x339d04cb GSEventRun + 62
  13 - 13  UIKit                               0x33a07d69 -[UIApplication _run] + 404
  14 - 14  UIKit                               0x33a05807 UIApplicationMain + 670
  15 - 15  MyApp                               0x000036af main + 70
  16 - 16  MyApp                               0x00003664 start + 40

最佳答案

您可能会尝试两件事: 有时应用程序崩溃并且调试器停止在完全不同的方法上。在 xcode 运行设置中启用“guard malloc”(在 xcode4 中的方案下),在调试器中运行应用程序直到它崩溃,然后看看它是否告诉你是哪个方法导致的。

如果没有,最好的办法是在调试器中运行应用程序并使崩溃发生。尝试一切,到处模拟内存警告,使用应用程序的每个功能,尝试应用程序中所有可能的路径组合。询问用户他们认为自己在做什么可能会缩小范围。

关于objective-c - 在几乎没有信息的情况下调试 iPad 设备崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7165760/

相关文章:

ios - UIButton 子类突出显示错误(即使在点击或触摸后突出显示仍然存在)

ios - replaceCharactersInRange 未按预期工作?

ios - CGRectIntersectsRect 用于多个 CGRect

android - 如何在 Objective-C 中将值 BOOL 设置为与 Firebase 中的 Java 相同?

iphone - origin 控件在 Interface Builder 中的作用是什么?

objective-c - 将 'Open With' 添加到自己的应用程序

debugging - valgrind 多重类型抑制

debugging - 如何使用 Mercury 编程语言进行编译以进行调试?

android - 在 Android Studio 中调试时,行断点不会挂起线程

iphone - 使用 CAAnimation 启用用户交互?