【问题标题】:EXC_BAD_ACCESS KERN_INVALID ADDRESS Crash on iOS9 devicesiOS9 设备上的 EXC_BAD_ACCESS KERN_INVALID ADDRESS 崩溃
【发布时间】:2017-09-27 16:04:27
【问题描述】:

我一直在尝试追踪应用程序的崩溃,但无论我做什么,我都无法清除它。崩溃只发生在 iOS9 设备上,但我无法重现它。我得到的报告是:

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x20fdba66 objc_msgSend + 5
1  Foundation                     0x2205d6df __NSThreadPerformPerform + 386
2  CoreFoundation                 0x217f5dff 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
3  CoreFoundation                 0x217f5981 __CFRunLoopDoSources0 + 344
4  CoreFoundation                 0x217f3d5b __CFRunLoopRun + 794
5  CoreFoundation                 0x21743229 CFRunLoopRunSpecific + 520
6  CoreFoundation                 0x21743015 CFRunLoopRunInMode + 108
7  GraphicsServices               0x22d33ac9 GSEventRunModal + 160
8  UIKit                          0x25e17189 UIApplicationMain + 144
9  MyApp                          0x63cd0 main (GameViewController.swift:18)
10 libdispatch.dylib              0x213eb873 (Missing)

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x21fdfa76 objc_msgSend + 21
1  Foundation                     0x230616df __NSThreadPerformPerform + 386
2  CoreFoundation                 0x227f9dff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
3  CoreFoundation                 0x227f9981 __CFRunLoopDoSources0 + 344
4  CoreFoundation                 0x227f7d5b __CFRunLoopRun + 794
5  CoreFoundation                 0x22747229 CFRunLoopRunSpecific + 520
6  CoreFoundation                 0x22747015 CFRunLoopRunInMode + 108
7  GraphicsServices               0x23d37ac9 GSEventRunModal + 160
8  UIKit                          0x26e1b189 UIApplicationMain + 144
9  MyApp                          0xa9cd0 main (GameViewController.swift:18)
10 libdispatch.dylib              0x223ef873 (Missing)

都非常神秘!代码中没有 runInMode(),我通过加入字符串处理了脚本中唯一的可变数组。我尝试使用仪器进行分析,但没有任何结果。

什么可能导致这种仅在 iOS9 上间歇性发生的崩溃?

【问题讨论】:

  • 更新:我再次运行 Instruments 寻找泄漏,它在第一次启动 malloc 8 字节时发现超过 1000 个然后关闭。它加载的只是一个故事板,没有任何警告。但是,我无法获得有关它们的更多信息,因此我不再继续。

标签: ios swift ios9


【解决方案1】:

通常,当我遇到仅在早期操作系统版本中发生的崩溃时,这是因为我使用了在更高版本的操作系统中引入的东西。我的第一个检查是查看您是否使用了可能是在 9.0 之后添加的东西,请记住可能在 9.1、9.2 等中添加的东西。在您的测试中,实际上是使用 9.0 模拟器或更高版本的 9。 x模拟器?使用 9.0 进行测试以确保,因为这将立即测试这种可能性。

【讨论】:

  • 我刚查了一下,大多数崩溃版本是9.3.5,我认为是最新的。
  • 太糟糕了,这本来可以轻松获胜。
  • 告诉我 - 我正在第 35 次构建:/
猜你喜欢
  • 1970-01-01
  • 2011-05-05
  • 2011-08-29
  • 1970-01-01
  • 2018-12-12
  • 1970-01-01
  • 2016-07-06
  • 1970-01-01
  • 2018-08-28
相关资源
最近更新 更多