Tool: Fix bootstrap server error when launching from xCode to iOS Simulator

Since the release of XCode 4.2 I have noticed a certain error poping up after buidling reguarly. The error incidcates that the iOS Simulator already has a process running or is hung. The anoying part is that even if you quit XCode and iOS Simulator, the problem wont go away.

This is the error:

Couldn’t register com.myApp.debug 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.Program received signal: “SIGABRT”.

OR:

Couldn’t register com.myApp.debug 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.

It didn’t happen every day but once a week on my work computer (MacBook Air), but now since two weeks ago this started also on my private computer (MBP) and its really anoying.

So, I googled a bit (didn’t really help that much) and tried some stuff from my own imagination and found out that if I kill all processes with “iPhone” in it, I can build again. It works for me almost every time… so I made this into a little script to run from the terminal and now I am sharing it with you!

The script

Make a .sh file called killiPhone.sh, and put it where ever you want. I put mine into my home directory. Give it chmod +x (to execute it).

Add the following content to the file:

What does it do?

What is does is that it first check if you are running it at super user. Then it check your processlist for any process with “iPhone” in it. Then it kills alls these processes.

Warning!

Like mentioned above, it kills all processes with iPhone in it. You are using this script at own risk, I am not responsible for you using the script.

License

Feel free to do whatever you want with it, at own responsibility and risk. If you publish it on your own website (modified or not), please refer back to this page!

Posted in Apple, Development, Free stuff, iOS, iPhone, Mac, Objective-c, OSX, Shell scripts, Tools, Tutorials, XCode Tagged with: , , , , , , , ,
5 comments on “Tool: Fix bootstrap server error when launching from xCode to iOS Simulator
  1. nnarayann says:

    I´ve tried it with no success, same error (even exiting Xcode and simulator, rebuilding…), nothing seems to do the trick. Thanks anyway ;)

  2. Paul Peelen says:

    I have noticed it as well a few times, despite my script. for 9 out of 10 times it works for me though.

    Can you see any weird processes when you type ps -A?

  3. nnarayann says:

    Yep, I found two zombie processes (with no parent) containing the name of my app. I think there is no way to get rid of them except rebooting, since kill command can´t do nothing with zombies. Any idea?.

    Thanks for replying!.

  4. Paul Peelen says:

    Didn’t work with the -9 either? Have a look at this page otherwise: http://www.cyberciti.biz/tips/killing-zombie-process.html

  5. nnarayann says:

    Already tried (even with sudo) and nothing.
    It’s the fourth or fifth time that it happens, so annoying… I think it´s related to weird and random Xcode´s crash message.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

 

Categories

Flattr me?

I would be very flattr'ed if you flattr me =)

Innovate thoughts | Process ideas | Elaborate the result