0

I'm new to iOS development, and having trouble identifying the source of a SIGABRT. I've narrowed it down to something that happens during initialization of a UIViewController subclass, specifically between its loadView and viewDidLoad methods.

I narrowed it down with an NSLog call in each of those method overloads in my UIViewController subclass. However, I'm unable to get any more granularity from the debugger; I can't step into the [super loadView] method. Are there any techniques for debugging a SIGABRT other than NSLogs and stepping through with the debugger? Is there any way to see exactly from where the exception was thrown?

Program-specific details

This program uses Core Data; I created it following this tutorial. I believe the SIGABRT started happening after I ran through the "Relationships In Action" section, and was not happening before (I think I had a successful build at the end of the preceding section). Specifically, I can successfully add a Person, but PersonDetailTableViewController throws a SIGABRT between loadView and viewDidLoad.

I've tried deleting the app from the iPhone simulator, and also running a Product > Clean; neither had any effect.

ericsoco
  • 24,913
  • 29
  • 97
  • 127
  • 2
    Try adding a breakpoint on all exceptions, http://stackoverflow.com/questions/10844725/why-does-nsassert-break-in-main-instead-of-in-the-code-that-call-the-assertion/10845508#10845508 – Ben Trengrove Feb 10 '13 at 21:20
  • hm, well, now it just stops on the [super loadView] call. i'm thinking i may have something set up incorrectly in my storyboard, but i've scoured it and nothing's popping out at me. – ericsoco Feb 10 '13 at 21:31
  • Possibly you have an incorrect class name in your storyboard? – Ben Trengrove Feb 10 '13 at 21:40

1 Answers1

0

Found the culprit. I had earlier incorrectly created an IBOutlet by ctrl+dragging from a Table View Cell's Text Field into my UITableViewController subclass. I manually deleted the code this created, but a connection remained in the Connections Inspector. Deleting that connection solved the problem -- no more SIGABRT.

It's unfortunate that Xcode sees the problem (see the exclamation mark in the attached image), but didn't tell me about it in any way except the mysterious SIGABRT....

Connections inspector shows invalid connection

ericsoco
  • 24,913
  • 29
  • 97
  • 127