12 Replies Latest reply: Jul 12, 2013 11:27 AM by iPodinfantry
luvelle Level 1 (0 points)

I'm working on an Xcode project running on Xcode 4.4.1 and Mountain Lion OSX 10.8.1, trying to get it to run on iPhone Simulator 5.1. Initially everything worked fine (I could build and run it on the simulator), but somehow, something went wrong and now everytime I try to run the project, I get, "error: failed to attach to process ID xxx", where xxx is the current process ID (and hence varies at each run). I've tried the following:

 

1. Uninstalling Xcode and reinstalling a fresh (and latest) copy.

2. Reformatting my MacBook and reinstalling the updated Mountain Lion.

3. Clicking on Product -> Clean in Xcode.

4. Deleting derived data in the Organizer pane, under the Projects tab.

5. Resetting content in the iPhone Simulator.

6. Deleting everything under ~/Library/Application Support/iPhone Simulator.

7. Restarting my MacBook several times.

8. Creating a whole new project without adding any components.

 

NONE of these worked for me. I'm still unable to run my project on the simulator and I've already wasted many many hours trying to fix it. Is this a bug in the latest updates? I've seen similar problems on stackoverflow, seems like no one has found a solution yet.

 

This is my last bid for an answer. I'm at my wits' end.


MacBook (13-inch Late 2009), OS X Mountain Lion (10.8.1), iPhone Simulator 5.1, Xcode 4.4.1
  • bdorno Level 1 (0 points)

    Having exactly the same problem.  I have tried most of the above solutions and and all the one listet at stackoveroflow, however nothing worked. I need help desperatly.

  • luvelle Level 1 (0 points)

    Are you still having the error? I've formatted my computer (yet again) and it worked for awhile, but broke after a few runs. It's very frustrating. I'd like to know, what's the make of your MacBook? Is it the earlier white one?

  • bdorno Level 1 (0 points)

    Yes, I still get the error. I am running xcode on the 2011 iMac i5, with mountain lion. However I works on my old 2006 white macbook running lion and xcode 4.3. Maybe it is something to do with using both versions of xcode on the same project. But I am only speculating. Where you able to fix it, somehow? 

     

    I hope the xcode update shipping with iOS 6 will help.

  • luvelle Level 1 (0 points)

    Haven't been able to fix it.

     

    But maybe the upgrade of Mountain Lion OS X and Xcode 4.5 will help! I'm formatting my computer again to try this out... *crossing fingers* Let me know how it goes for you

  • fatalfeel Level 1 (0 points)

    can not use root login

  • HLBControls Level 1 (0 points)

    I had exactly the same problem: when using any current version of Xcode 4.xx and the LLDB debugger, plus any version of the Simulator, Xcode consistently crashed with 'failed to attach to process ..'.  My only resolution was to switch to the GDB debugger. This was disappointing since I really wanted to try the new, robust LLDB in XCode 4.6-DP.

     

    And then I remembered; I had changed my network/server host file at ...etc/hosts some time ago to accomodate several Apache2 server virtual hosts, i.e., I removed the line:

     

    127.0.0.1 locahost

     

    That was it. Removing that line, Xcode crashed on attaching to the Simulator with LLDB.

    Restoring that line, XCode worked just fine with LLDB and the Simulator.

     

    Anyway, this may not be your problem but it's worth exploring. As far as I'm concerned, it's a serious undocumented bug.

  • HyperNova Software Level 6 (8,655 points)

    Did you file a bug report?

  • HLBControls Level 1 (0 points)

    No bug report yet. I was waiting for it to be confirmed by at least one other developer.

  • csabbah Level 1 (0 points)

    Hi, I had the same problem and after I checked the hosts file and wrote the "127.0.0.1 localhost" line in it then everything become fine. Thanks!

  • pedrouan Level 1 (5 points)

    Man, You saved my life!!! Thank You, I appreciate you contribution to the discussion!

  • damian.tochetto Level 1 (0 points)

    @csabbah, Thanks!! it works for me.

  • iPodinfantry Level 1 (0 points)

    @HLBControls that worked for me like a charm! thanks, I dealt with that same issue for a while now It works on my macbook air!