Hey all basically what the title says, I was working on my project with no issues and then all of the sudden it just stopped compiling. The only thing that led up to this wa
I just ran into this, closing xcode and reopening it did the trick. I am curious now if purge
would have done anything.
I just had that same error, same situation(the code worked totally fine, then suddenly has that error message). For me I just closed the simulator and opened it again then xCode does not complain anymore.
Have you tried to run your code in device?
This is happening because your OS X install is running into the per-user process limit. And that's happening because XCode doesn't always cleanly kill your process at the end of a debugging session.
On my machine, I have 709 processes allowed per user:
El Smeg:~$ sysctl kern.maxprocperuid
kern.maxprocperuid: 709
Looking at the number of zombied processes on my machine:
El Smeg:~$ ps aux | grep \(GridView\) | wc -l
608
So you can see that I'm pretty close to the per-user process limit just due to XCode leaving zombie processes around.
Unfortunately, I don't see a good way to kill these off. kill -9 doesn't work. Rebooting seems to be the only fix aside from temporarily raising your per-process limit, which isn't really a fix. You can't kill the parent process because that's launchd and killing that is pretty much equivalent to a reboot anyway.
Roboot your MAC, Launch xcode and before doing anything clean up your project (cmd+shift+k).
For me, I just had to reboot (OS X 10.7, Xcode 4.5).
I did the clean and rebuild, also did "remove the app from the simulator". The problems just did not go away, sometimes it shows up as another compiler error on a xib file (which is a false alarm). Eventually I did reboot the machine and it fixed the problem.
I recall doing the kill Xcode/simulator process in the past, but can not recall the exact situation.