I use Xcode 4.2 and I get 90% of the time this message:
#autoreleasepool
{
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
Thread 1: Program received signal "SIGABRT"
When it works and quit iOS Simulator I get :
Thread!: program received signal SIGTERM
NOW ALL the programs (even simple tutorials with single sound button) that worked perfect before when I quit Simulator I get SIGTERM and when I try to run again I get SIGABRT.
I am getting paranoidddddddddd.
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)
What am I supposed to do?
Some things for you to try that have helped me in the past (in this order):
Product > Clean
Uninstall/delete your apps from your devices manually.
In iOS Simulator, iOS Simulator > "Reset Content and Settings".
Delete everything in your "Derived Data" for the projects causing the problems. (Screenshot) In Organizer > Projects.
Quit xCode.
Restart your machine.
I've noticed that Derived Data causes the most problems when you make multiple projects with the same name, wether it's on purpose, or by accident.
Edit: More details..
The only time I've ever gotten SIGTERM is when you run a test on a "device" and then quit the app from the device before you hit stop in xCode, then try and launch it again on the device. If it was more of a SIGABRT problem, I always check my IBOutlets. SIGABRT happens every time you delete the code for an outlet, but don't delete the connection in IB. [xcode 4.2.1]
The previous app is still 'stuck' in the simulator. Try completely quitting the simulator, cleaning your project, then trying to build again.
Edit: A complete restart of your mac sounds like the next step. In my experience this error has always had to do with an issue with the simulator, rather than the code itself.
SIGABRT means that your program is throwing an exception. If you don't explicitly set a breakpoint to trigger when the exception is thrown, then Xcode shows you the SIGABRT in main, which is useless for debugging.
You need to add an exception breakpoint so you can see where the exception is being thrown.
Related
I'm with some really weird problem here.
Every time when I add a second image view, the program crash: "Couldn't register ken.word 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.(gdb)" (SIGABRT)
it goes SIGABRT on this part of the code:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
but when I just add one image view, it goes perfectly well.
I've tried to restart the Xcode, even restarting the mac, and it didn't work.
I've also tried to create another project, and it didn't work either!
I'm using Xcode 4.2
Quit your XCode and Simulator then try again. It will work. And never quit your simulator when it is in running mode, first stop the program then quit.
And if you are running your app in your device then delete your app from device, switched OFF your device then ON and try.
I'm facing unexpected crashes of my app running on an iPhone 4 with iOS 5.0.1, the app crash without generating any error message nor crash log. I did also enabled zombies and tested with Instruments with no luck... how can I figure out where is the problem? I'm totally stuck :(
ps. I'm using ARC and my app is multi thread (NSOpertations + GCD)
(By popular demand:) There are some hints for catching the failure in this thread.
From the breakpoint-menu in Xcode, press the little '+' button at your window bottom left, and add an exception breakpoint. It will give you a heads up if the app throws an exception due to erroneous code.
Just follow this url you will get trick to track the causes of crash.
add some breakpoint before crashing point and add a lot of NSAssert to check your assertion.
After XCode 4.2 installation my old app cannot be run. The build is successful but once simulator tries to run the app I get an error:
Thread 1: Program received signal SIGABRT
It points to this line in code in main function:
int retVal = UIApplicationMain(argc, argv, nil, nil);
No errors in the log other than:
(gdb)
Does it have to do with autoreleasepool in iOS 5? Where to look for an error? I doubt this is a code related issue because I was just running this app fine in older Xcode. This is an iPad app.
Go to Build settings -> architectures
try to set the Valid architectures to armv6
i think it will help you
Its not because of main function..
you check in GDB is there any unrecognized selector or memory leak issues..
Go to product button of xcode-->Edit scheme-->select run (second cell of left hand side table) -->select Diagnostics--> Enable zombie objects....
After changing this setting clean and run your project you will the reason of crashing
This could be an instance of this issue. I.e., you have a simulator process that's wedged, and you need to reboot your machine to clear it out.
It seems in iOS 4, because your app goes into the background, it remembers where you last were. When I quit my app by pressing home, and then click on it again in the simulator shortly after, it remembers where it was and AFAIK it is working.
When I kill the app by double tapping home, holding the icon of my app in the bottom, pressing the delete key, then clicking on the normal icon to start the app, the app immediately crashes. I get:
Thread 1: Program received signal: "SIGKILL".
at the line
int retVal = UIApplicationMain(argc, argv, nil, nil);
The console just says:
[Switching to process 46794 thread 0x207]
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
I'm not sure where to go to start debugging this. Thanks!
In my not so bast experience the simulator and XCode don't have great communication. The console does get all the outputs it should when you're running but once you switch to another App, close it, or whatever, nothing will work as expected.
When I run the an up from Xcode into a real iPhone, if you close it, Xcode will still lets you STOP it.
If the app actually crashes you should look into the crash logs.
You should also try using Instruments
To not get a crash on your device you need to disconnect it from your computer once the application has been copied over. Then you can exit it and restart it without issues.
Once you completely shut down the app, I think the debugger loses all communication with it. If the app is in the background the debugger still reattaches I think when you launch it. If you completely close the app on the phone, and wanted to debug and view it through the console in Xcode, you would need to start the app from Xcode again.
When I double tap the home button and quit out of my app from the multitasking bar and open the app again, Xcode reads: "Thread 1: program received signal: SIGKILL" and freezes my iPod. The app has 1500+ lines so I can't really put any code up, sorry. What could I be doing wrong?
Your 1500+ lines of code is really innocent of this crash.
It happens when you run the app from Xcode, and terminate it from the iPod, without stopping the execution from Xcode. Closing the app from multitasking bar doesn't stop its execution in Xcode(but, I always expect it to do). So, when you open it again, the Xcode throws that SIGKILL exception. And, it doesn't do any harm to your app. No need to worry about it.
And, ofcourse, I don't know any technical explanation for this behavior. I am not that genious ;-)
That's normal, your app is receiving a signal that it has to terminate.
Just make sure that when it does, you handle it properly in one of the UIApplication delegate methods, so that no information is lost, and such.