Reputation: 19926
After I run my iPhone project in iPhone Simulator Xcode 4.6 t hangs at the "Running in iPhone 6.1 Simulator" stage every 2nd or 3rd time. Yes, at such regular basis.
It hangs on almost every project I run and on my 2 Mac machines (Mac Mini 8GB, Core 2 Duo, SSD drive and MacBook Pro Core 2 Duo 3,1 Ghz, 8BG RAM, SSD Drive)
This was also the issue in previous Xcode but it has been occurring rarely enough to be tolerable.
I need to restart my Xcode and simulator to be able to run project again (sometimes even restart OS X).
What causes this and what can we do besides restarting Xcode to solve it? Why Apple can't resolve this issue for such a long time?
UPDATE:
I got flagged that this question is unconstructive, with what I do NOT agree as my main and first question was:
What causes this regular hangs? Why Apple has not solved it for such a long time is not my main interest.
Main concern stays very practical and technical: what is the reson of such regular disfunction and is there something developer can do manually to help it?
After all: Xcode is just a tool we use at work and every knowledge which can gain productivity is valuable.
UPDATE 2:
** After reinstalling to the newestMac OS X Lion (clean install) and installing newest Xcode, iTunes, Safari, iPhone Simulator problem persists.** This is clearly Xcode or iPhone simulator bug.
Upvotes: 19
Views: 4093
Reputation: 4536
I have noticed that you can significantly decrease occurrence of this bug by running app on simulator like this:
By waiting few seconds after stopping the app it seems to prevent the Xcode execution freeze. I think that the debugger doesn't have enough time to detach and reattach so it hangs.
Upvotes: 1
Reputation: 71
I've had the same issues, found that it was related to the newest iTunes since when I unplugged my iPhone target, the color wheel would go away. I've since down rev'd iTunes to 10.7 and the problem is gone. The newer iTunes seem's to get stuck querying the iPhone, and can't progress. I'm running Mac OS X 10.7.5 on an old iMac. I don't have this problem running on a MacBook with 10.8 and the latest iTunes.
Upvotes: 1
Reputation: 21
I found an fix on a similar post. Make sure that '127.0.0.1 localhost' is in your etc hosts file. This fixed it for me and I had been getting the 'hanging attaching to simulator' issue 100% of the time.
Upvotes: 2
Reputation: 535890
I have experienced the same thing many times, often many times a day, not necessarily after a crash. So yes, the bug exists and I've reported it to Apple and have continued to revise the report as data warrants. You should do the same (and provide Apple with a Sample report to show what the threads are doing during the hang each time). This has nothing to do with PLCrashReporter; I can experience this problem with a bare template project. Your question, though, seems unconstructive, as no useful answer can be given. Who can possibly tell you why Apple hasn't fixed it? The only people who can tell you that would be Apple, and you know that they won't tell you. So your question is purely rhetorical. :)
Upvotes: 4