2

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?

Artem Shmatkov
  • 1,434
  • 5
  • 22
  • 41
George
  • 73
  • 1
  • 1
  • 6
  • I would first try restarting your Mac. Sometimes Simulator can become 'stuck'. Just noticed AtkinsonCM's answer, That might work but restarting almost always works. – Michael Smith Feb 16 '12 at 21:33
  • have you updated your simulator lately? – pinkeerach Feb 16 '12 at 21:43
  • I haven't updated simulator, I installed Xcode mid December.I did reset content sand settings in simulator and many times restart. – George Feb 16 '12 at 23:14

3 Answers3

7

Some things for you to try that have helped me in the past (in this order):

  1. Product > Clean
  2. Uninstall/delete your apps from your devices manually.
  3. In iOS Simulator, iOS Simulator > "Reset Content and Settings".
  4. Delete everything in your "Derived Data" for the projects causing the problems. (Screenshot) In Organizer > Projects.
  5. Quit xCode.
  6. Restart your machine.

enter image description here

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]

jhilgert00
  • 5,479
  • 2
  • 38
  • 54
  • Yeah, I have 3 projects with similar names (not the same) but with completely same actions, images and sounds. Should I delete the other 2 projects? – George Feb 17 '12 at 00:24
  • If they have different names, you should be ok. Can you clarify something for me. This is happening no matter what project you open, or on a specific project? – jhilgert00 Feb 17 '12 at 00:27
  • I had to reword my previous comment. – jhilgert00 Feb 17 '12 at 00:30
  • Today for a few minutes, happened in every project! – George Feb 17 '12 at 00:38
  • Now, it worked, then I quitted simulator and I got SIGTERM. When I opened the project I got SIGABRT. I did deleted the derived data. – George Feb 17 '12 at 00:46
  • OK, 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. – jhilgert00 Feb 17 '12 at 00:47
  • That's it!!! I was going to ask you. I have a button and by mistake instead of an action, I created an outlet. But in Xcode 4.2 is not deleted automatically the connection? I have many buttons, I am going to check. – George Feb 17 '12 at 01:02
  • I had deleted the connection in IB. Has anything to do with the Table View Controller (I put 30 lines) or the view controller I deleted (with actions) – George Feb 17 '12 at 01:31
  • Your welcome! I would apreciate you marking my answer as correct if it solved your problem :) Thanks.. – jhilgert00 Feb 17 '12 at 18:59
  • I am sorry but I can not vote up yet, it requires 15 reputation...Thanks a lot!!! – George Feb 17 '12 at 19:04
  • This seems to have fixed my issue. I am using Xcode 6.1.1. Curious thing that happened after I did this, was that my application no longer compiled. Had a missing semi-colon. I have fixed a #define in a different file the other day, where I had put in a semi-colon by accident, yet didn't find the missing one in my class until after I did the steps above. Seems like it might be worthwhile to do a clean, and also delete derived data once in a while. Didn't know about cleaning up derived data till I came across this post. Thx. – DaveDude Jan 24 '15 at 02:34
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.

AtkinsonCM
  • 376
  • 1
  • 14
0

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.

Community
  • 1
  • 1
rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • Well I got: 0_pthread_kill: 0x9bf079c6 <+0010> jae 0x9bf079d6 <__pthread_kill+26> 5 UIApplicationMain: 0x0030f855 <+0593> mov 0x6165fa(%esi),%eax – George Feb 16 '12 at 23:10