Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 (gdb)

like image 703
Henry F Avatar asked Jan 05 '12 19:01

Henry F


People also ask

How do you resolve a SIGABRT?

Use the exception breakpoint to gather extra information for the SIGABRT crash, and then disable it once you've solved the bug (until it's needed again).

What is signal SIGABRT in Xcode?

The SIGABRT signal specifically indicates that your app called the "abort()" function, which is how apps crash themselves intentionally. The key to understanding a SIGABRT, therefore, is the error message displayed as part of the abort.

How do I debug SIGABRT in Xcode?

For SIGABRT errors, run in debug until the program crashes. Then, there should be a little black button with the text "GDB" in yellow over it above your code editor in your mini-debugging bar. Click it, and it will bring up your debugger console.

What is error SIGABRT?

A SIGABRT (signal abort) error means that the app was deliberately crashed due to some really bad problem, like a runtime error during the start-up sequence or a bad or unreadable user interface file.


1 Answers

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.

like image 125
dgund Avatar answered Sep 30 '22 10:09

dgund