views:

79

answers:

2

I have a fairly simple app. It compiles fine. Unfortunately, when I Build and Go, it fails before even the first line of code, thus making it impossible for me to even debug it.

Where do I start? I do have the stack track though.alt text

+12  A: 

From the stack trace, it seems your Outlet connections seem messed up in your main XIB file - you could start looking there.

Other than that, you won't be able to debug much, because there's no source code for the iPhone built-in mechanisms, which seem to be failing here (most probably because of something you did in the interface designer/XIBs).

Adam Woś
Your call is right on the money. I renamed one of the outlets and forgot to make the matching changes. Thanks.
AngryHacker
Glad to help :)
Adam Woś
+1  A: 

Set a breakpoint at objc_exception_throw, then restart the application. The breakpoints should be kept after the restart, allowing you to see what's wrong.

KennyTM
Unfortunately, he won't be able to see much, as all the code seems from `UIKit`...
Adam Woś
Sometimes it's worth a try because exception throws tends to mess up the stack trace.
KennyTM
Where exactly is objc_exception_throw and how do I place a breakpoint there?
AngryHacker
`objc_exception_throw` is called when some code `@throw` an `NSException` (or anything). You can set a breakpoint in the debug console (gdb) with `b objc_exception_throw`.
KennyTM
In the Breakpoints dialog, just go into global breakpoints, and double-click on a new line for a breakpoint - type in "objc_exception_throw" and you are all set. I know you solved the problem but that's just helpful anyway.
Kendall Helmstetter Gelner