App Crash on Multi-tasking re-entry (Swift)

0

Been getting a strange error recently and hope to find a solution here. On double-clicking home and immediately re-entering the app a crash occurs. I've been looking around for a solution in other SO posts but there doesn't seem to be any that come close to this strangeness. The project uses several swift/objc open source libraries and if it is helpful I will post them here as well. I've done everything from cleaning out the AppDelegate, DerivedData/Caches, Pods, the main controllers on re-entry(home, login, auth), and no dice :(

The system logs at the time of crash from a physical device are as follows.

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

Edit: Back Trace from breakpoint in applicationWillTerminate below. Also the wording of crash may be incorrect as the logs say that the app exited voluntarily upon re-entry and no lldb errors are thrown.

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

Every other system behavior works as expected and the app functions without a hitch (pressing home and re-opening, lock screen and re-open, opening another app and re-opening, 3d touch navigation etc.). Hope this is descriptive enough, I will try to elaborate more if it is unclear.

XCode Version 7.3

iOS Version 9.3

Swift 2.2

ios
swift
crash
appdelegate
asked on Stack Overflow May 23, 2016 by sinanu • edited May 23, 2016 by sinanu

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0