I am stuck on a peculiar NSException. Essentially, I have a table view cell with a button in it. When I click the button, the app crashes. The cause?
libc++abi.dylib: terminating with uncaught exception of type NSException
This, of course, is a rather unhelpful message, so I got the backtrace:
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001113f8d42 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x0000000111430457 libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00000001110b80e7 libsystem_c.dylib`abort + 127
frame #3: 0x0000000110e4a91f libc++abi.dylib`abort_message + 245
frame #4: 0x0000000110e4aabb libc++abi.dylib`default_terminate_handler() + 265
frame #5: 0x000000010af481be libobjc.A.dylib`_objc_terminate() + 97
frame #6: 0x0000000110e66159 libc++abi.dylib`std::__terminate(void (*)()) + 8
frame #7: 0x0000000110e65e0a libc++abi.dylib`__cxa_rethrow + 99
frame #8: 0x000000010af480dc libobjc.A.dylib`objc_exception_rethrow + 40
frame #9: 0x000000010b838a39 CoreFoundation`CFRunLoopRunSpecific + 537
frame #10: 0x00000001132f19c6 GraphicsServices`GSEventRunModal + 62
frame #11: 0x000000010cbc25e8 UIKit`UIApplicationMain + 159
* frame #12: 0x0000000109b44c57 Novena Network`main at AppDelegate.swift:16
frame #13: 0x0000000110fe5d81 libdyld.dylib`start + 1
frame #14: 0x0000000110fe5d81 libdyld.dylib`start + 1
I'm not exactly sure what to make of it. I thought maybe something was messed up with my @IBOutlets or @IBActions, but everything looks ok.
I also set an Exception Breakpoint for all exceptions. All this has done is set a breakpoint at the declaration of the AppDelegate
class, which hasn't been very helpful.
I found this post on Github about someone who was getting the same error message and a similar backtrace. His issue ended up being related to an NSAttributedString
. I am not using any attributed strings in my project (I searched the whole thing for "NSAttributedString".)
If anyone has any ideas or suggestions based on the backtrace, I'd be very grateful. Let me know if you have any other questions about the UI I'm dealing with.
PS I'm using Swift 4 and Xcode 9.1 (the release version).
PPS po $arg1
didn't work.
(lldb) po $arg1
error: <EXPR>:3:1: error: use of unresolved identifier '$arg1'
$arg1
^~~~~