【发布时间】: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 个然后关闭。它加载的只是一个故事板,没有任何警告。但是,我无法获得有关它们的更多信息,因此我不再继续。