App SIGABRTs on AppDelegate

你。 提交于 2019-12-12 03:54:30

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/41132026/app-sigabrts-on-appdelegate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!