0

I'm trying to debug my app's interface and immediately as it launches it crashes with:

libc++abi.dylib: terminating with uncaught exception of type NSException

And when I type bt in the debugging pane

* thread #1: tid = 0x145ce, 0x00000001917e74bc libsystem_c.dylib`__abort + 176, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1917e74bc)
  * frame #0: 0x00000001917e74bc libsystem_c.dylib`__abort + 176
    frame #1: 0x00000001917e740c libsystem_c.dylib`abort + 152
    frame #2: 0x00000001912b12d4 libc++abi.dylib`abort_message + 132
    frame #3: 0x00000001912cecc0 libc++abi.dylib`default_terminate_handler() + 304
    frame #4: 0x00000001912dc844 libobjc.A.dylib`_objc_terminate() + 124
    frame #5: 0x00000001912cb66c libc++abi.dylib`std::__terminate(void (*)()) + 16
    frame #6: 0x00000001912cb234 libc++abi.dylib`__cxa_rethrow + 144
    frame #7: 0x00000001912dc71c libobjc.A.dylib`objc_exception_rethrow + 44
    frame #8: 0x000000019277e32c CoreFoundation`CFRunLoopRunSpecific + 560
    frame #9: 0x0000000194232198 GraphicsServices`GSEventRunModal + 180
    frame #10: 0x00000001987c57fc UIKit`-[UIApplication _run] + 684
    frame #11: 0x00000001987c0534 UIKit`UIApplicationMain + 208
    frame #12: 0x00000001001ab6b0 AppName`main + 140 at AppDelegate.swift:30
    frame #13: 0x00000001917615b8 libdyld.dylib`start + 4

Is there a way I can get more useful information than this to solve my issue. I have already tried everything on this page.

Any tips on how to debug Interface Builder documents?

Community
  • 1
  • 1
Alex Smith
  • 468
  • 5
  • 22
  • Do you have breakpoints set in Xcode to catch C++ and ObjC unhandled exceptions? – Kerni Dec 13 '16 at 23:07
  • Yes, with that symbolic breakpoint set and once hit, it highlights the declaration of my AppDelegate. – Alex Smith Dec 13 '16 at 23:11
  • Possible duplicate of [Always stop in App delegate after enabling All exceptions break point](http://stackoverflow.com/questions/29472408/always-stop-in-app-delegate-after-enabling-all-exceptions-break-point) – Kerni Dec 13 '16 at 23:20
  • Nope. Actually, I am only catching Obj-C exceptions, however, since your first comment, I did try All (Obj-C and C++) as well. I'm back to only catching Obj-C exceptions with my symbolic breakpoint. – Alex Smith Dec 13 '16 at 23:23

1 Answers1

0

It turns out that I had an unrecognized selector sent to instance 0xABC123 exception being thrown. I only discovered this because I used the inline closure:

NSSetUncaughtExceptionHandler { exception in
    print(exception)
    print(exception.callStackSymbols)
}

at the end of my application(_:didFinishLaunchingWithOptions:) method in my AppDelegate. For some reason the symbolic any exception breakpoint wasn't providing me with the same amount of detail.

Alex Smith
  • 468
  • 5
  • 22