AppDelegate上的App SIGABRT

时间:2016-12-13 22:58:57

标签: ios xcode interface-builder xcode8

我正在尝试调试我的应用程序界面,并在启动时立即崩溃:

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

当我在调试窗格中键入bt

* 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

有没有办法可以获得比这更有用的信息来解决我的问题。我已经在this页面上尝试了所有内容。

有关如何调试Interface Builder文档的任何提示?

1 个答案:

答案 0 :(得分:0)

事实证明我抛出了unrecognized selector sent to instance 0xABC123个异常。我之所以发现这是因为我使用了内联闭包:

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

在我的应用程序结束时(_:didFinishLaunchingWithOptions :)在我的AppDelegate中。由于某种原因,符号任何异常断点都没有为我提供相同数量的细节。