iOS Debugging Crashes Debugging SIGABRT and EXC_BAD_INSTRUCTION crashes


A SIGABRT or an EXC_BAD_INSTRUCTION usually means the app crashed itself intentionally because some check failed. These should log a message to the debugger console with more information; check there for more information.

Many SIGABRTs are caused by uncaught Objective-C exceptions. There are a lot of reasons exceptions can be thrown, and they will always log a lot of helpful information to the console.

  • NSInvalidArgumentException, which means the app passed an invalid argument to a method
  • NSRangeException, which means the app tried to access an out-of-bounds index of an object such as an NSArray or an NSString
  • NSInternalInconsistencyException means an object discovered it was in an unexpected state.
  • NSUnknownKeyException usually means you have a bad connection in an XIB. Try some of the answers to this question.