John John - 10 months ago 70
iOS Question

Xcode 4.2 SIGABRT Error

Everytime I run my app on the iPad simulator, it works flawlessly. But, when I run it on the iPhone simulator, when I click the home button, I get an error in Xcode in my main.m file, saying "Thread 1: Program received signal: SIGABRT". It is highlighting this line in my main.m's code:

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

This issue doesn't occur when I press the home button on the iPad simulator at all though. I've done a lot of research on here about this error, but nothing useful seemed to turn up. Does anyone know how to go about fixing this?

Edit: here is some more info from the debugger console

"Couldn't register None.TestApplication with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.sharedlibrary apply-load-rules all
Current language: auto; currently objective-c

Answer Source

The line UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); just means that an exception was thrown during the running of your program. This could range from a memory problem, to a simple runtime error. Look in the target debugger console; it will tell you where the error occurred.

Edited due to edited question: I have solved this question before by restoring the iOS simulator to factory defaults (Open "iOS Simulator" Menu in the upper left -> Reset Content and Settings). Then quit the iOS simulator and Xcode, and then restart your computer. This will get rid of the other instance of the process.