在过去的几天里,我真的一直在扯头发,因为我的应用程序中有一个似乎是随机发生的错误!我想我会在这里询问是否有人有类似的经历。
当加载某个视图控制器时,该应用程序正在崩溃。但这似乎每 25-30 次中只会发生 1 次——所以对我来说这似乎是完全随机的!
控制台显示以下错误
Warning: Attempt to dismiss from view controller <UINavigationController: 0x1f025c30> while a presentation or dismiss is in progress!
然后应用程序崩溃。
然而,实际上没有任何代码可以关闭这个视图控制器——我使用 JASidepanels ( https://github.com/gotosleep/JASidePanels ) 但是这个错误只发生在一个视图中。因此,由于没有关闭它的代码,我真的不确定这是怎么发生的。(JASidepanels 滑动并隐藏此面板 - 但在视图加载时不会调用此面板)
下面是符号化的崩溃报告——我真的在这里找不到太多用处:
Incident Identifier: 8E0C4F14-1B7B-4241-A1D3-37AD55F3D432
CrashReporter Key: fb5a345eac1c4c3ba4fbe6158b1d6af5833f137e
Hardware Model: iPad2,7
Process: appName [7665]
Path: /var/mobile/Applications/130C6C0F-40E0-4EE7-AD2A-F7CFCFD6C462/appName.app/appName
Identifier: appName
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-07-02 14:24:24.588 +0100
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 9
Last Exception Backtrace:
0 CoreFoundation 0x32f5729e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3ae1297a objc_exception_throw + 26
2 CoreFoundation 0x32f56d80 __NSFastEnumerationMutationHandler + 124
3 UIKit 0x34d6ff92 -[UIView(Hierarchy) subviews] + 326
4 UIKit 0x34d7b04a -[UIView(Geometry) resizeSubviewsWithOldSize:] + 22
5 UIKit 0x3519cc28 -[UIView(AdditionalLayoutSupport) _is_layout] + 112
6 UIKit 0x34d68a8c -[UIView(Hierarchy) layoutSubviews] + 68
7 UIKit 0x34d627fe -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 254
8 QuartzCore 0x34b0cd86 -[CALayer layoutSublayers] + 210
9 QuartzCore 0x34b0c924 CA::Layer::layout_if_needed(CA::Transaction*) + 456
10 QuartzCore 0x34b0d858 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
11 QuartzCore 0x34b0d23e CA::Context::commit_transaction(CA::Transaction*) + 234
12 QuartzCore 0x34b0d04c CA::Transaction::commit() + 312
13 QuartzCore 0x34b0ceac CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
14 CoreFoundation 0x32f2c6c8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
15 CoreFoundation 0x32f2a9bc __CFRunLoopDoObservers + 272
16 CoreFoundation 0x32f2ad12 __CFRunLoopRun + 738
17 CoreFoundation 0x32e9deb8 CFRunLoopRunSpecific + 352
18 CoreFoundation 0x32e9dd44 CFRunLoopRunInMode + 100
19 GraphicsServices 0x36a692e6 GSEventRunModal + 70
20 UIKit 0x34db32fc UIApplicationMain + 1116
21 appName 0x0009c1a2 main (main.m:16)
22 libdyld.dylib 0x3b249b1c start + 0
线程 9 - 崩溃了:
Thread 9 Crashed:
0 libsystem_kernel.dylib 0x3b310d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3b25ecf6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3b25ea12 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3b25e8a0 start_wqthread + 4
任何帮助将不胜感激!