最近发现了一个奇怪的错误,希望在这里找到解决方案。双击主页并立即重新进入应用程序时发生崩溃。我一直在寻找其他SO帖子的解决方案,但似乎没有任何接近这种陌生感。该项目使用了几个swift / objc开源库,如果有用,我也会在这里发布它们。我已经做了一切,包括清理AppDelegate,DerivedData / Caches,Pods,重新进入的主控制器(主页,登录,auth),并且没有骰子:(
从物理设备崩溃时的系统日志如下。
May 22 18:53:47 iPhone-6 SpringBoard[63] <Warning>: BSXPCMessage received error for message: Connection interrupted
May 22 18:53:47 iPhone-6 SpringBoard[63] <Warning>: HW kbd: Failed to set (null) as keyboard focus
May 22 18:53:47 iPhone-6 SpringBoard[63] <Warning>: UNNotificationRegistrarConnectionListener connection invalidated
May 22 18:53:47 iPhone-6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[3269] <Warning>: 1 +0.000000 sec [0cc5/1b0b]: error: ::read ( -1, 0x16e246a38, 1024 ) => -1 err = Bad file descriptor (0x00000009)
May 22 18:53:47 iPhone-6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[3269] <Warning>: Exiting.
May 22 18:53:47 iPhone-6 gputoolsd[3265] <Notice>: schedule invalidation <DYTransport 0x13d504ba0, error: explicit invalidation (6)>
May 22 18:53:47 iPhone-6 gputoolsd[3265] <Notice>: schedule invalidation <DYTransport 0x13d50f850, error: lost transport connection (31)>
May 22 18:53:47 iPhone-6 gputoolsd[3265] <Notice>: terminating daemon 0x13d50f510
May 22 18:53:47 iPhone-6 SpringBoard[63] <Warning>: Application 'UIKitApplication:com.argentapp.ios[0x552c]' exited voluntarily.
May 22 18:53:47 iPhone-6 UserEventAgent[26] <Warning>: 6754616024137: id=com.argentapp.ios pid=3270, state=0
编辑:从下面的applicationWillTerminate中的断点返回跟踪。崩溃的措辞也可能是错误的,因为日志说应用程序在重新进入时自动退出并且没有抛出lldb错误。
applicationWillResignActive
<UIApplication: 0x14782c3c0>
<NSUserDefaults: 0x14782ee50>
applicationWillTerminate
(lldb) bt
* thread #1: tid = 0x15fd47, 0x00000001000a86b0 Argent`AppDelegate.applicationWillTerminate(application=<unavailable>, self=<unavailable>) -> () + 188 at AppDelegate.swift:254, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00000001000a86b0 Argent`AppDelegate.applicationWillTerminate(application=<unavailable>, self=<unavailable>) -> () + 188 at AppDelegate.swift:254
frame #1: 0x00000001000a878c Argent`@objc AppDelegate.applicationWillTerminate(UIApplication) -> () + 68 at AppDelegate.swift:0
frame #2: 0x00000001877ed240 UIKit`-[UIApplication _terminateWithStatus:] + 280
frame #3: 0x0000000187a0bff8 UIKit`__102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2017 + 796
frame #4: 0x0000000187a0f0c8 UIKit`_runAfterCACommitDeferredBlocks + 292
frame #5: 0x0000000187a1ca80 UIKit`_cleanUpAfterCAFlushAndRunDeferredBlocks + 92
frame #6: 0x000000018774e5a4 UIKit`_afterCACommitHandler + 96
frame #7: 0x00000001825b4728 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
frame #8: 0x00000001825b24cc CoreFoundation`__CFRunLoopDoObservers + 372
frame #9: 0x00000001825b28fc CoreFoundation`__CFRunLoopRun + 928
frame #10: 0x00000001824dcc50 CoreFoundation`CFRunLoopRunSpecific + 384
frame #11: 0x0000000183dc4088 GraphicsServices`GSEventRunModal + 180
frame #12: 0x00000001877c6088 UIKit`UIApplicationMain + 204
frame #13: 0x00000001000a8f1c Argent`main + 144 at AppDelegate.swift:41
frame #14: 0x000000018207a8b8 libdyld.dylib`start + 4
每个其他系统行为都按预期工作,应用程序功能顺畅(按下主页并重新打开,锁定屏幕并重新打开,打开另一个应用程序并重新打开,3d触摸导航等)。希望这是足够描述性的,如果不清楚,我会尝试详细说明。
XCode版本7.3
iOS版本9.3
Swift 2.2