P248 NSException


I’m having problems when trying to troubleshoot a program crash. Whenever my program crashes, it doesn’t give me any information, it just says “Thread 1: Program received signal : SIGABRT” on the main function.

On page 248 we create an exception on purpose to cause a crash when using a default initalizer.

The line of code "@throw [NSSException exceptionWithName:@“Wrong initalizer” reason:@“Use initForNewItem:” userInfo:nil]; is supposed to throw an exception on purpose and the error is supposed to show up in the Console Log. The problem is that all I see is “Thread 1 : Program receieved signal : SIGABRT” in the code area near the main() function and the Console Log doesn’t have any of the information I’m supposed to see, like “Wrong initializer” etc. I can click on the items on the left under Thread 1, like 0__Kill, 9 UIApplicationMain, 10 main, 11 start, but all I see is meaningless memory addresses and assembly code instructions which don’t help me.

I’ve been having this problem as long as I’ve been using XCode. I’m running Xcode 4.1 on MAC OS X 10.6.8 Snow Leopard with iOS 5.0 SDK. Has anyone else had this problem?? If anyone can shed any light on this it would be most helpful. I pretty much cannot ever do any real debugging this way.