Editor freezes after play

I have been having an issue with the Unity editor freezing 100% of the time when I play the game (regardless of starting scene it seems) and then end it gracefully by pressing the play button. The next time I either try to play it or quit via the menu after this Unity will just stop responding and I have to perform a force quit from activity monitor.

I am using Unity iOS Pro on an iMac (build targeted at iOS). I have opened other projects and it seems only this specific project has this behavior. I’ve tried both re-installing Unity and deleting and re-downloading my project from our version control and neither have helped.

Has anyone experienced anything like this or have any advice to offer?

Thanks in advance.

EDIT: Upon further inspection it just hangs for maybe 3 minutes, rather than freeze, so if I let it sit long enough it will eventually begin playing (although it is faster for me to just kill it and restart it). Also as a clarification I am able to run it the first time without incident, I only experience the hang on every attempt to play beyond the first.

This could be an issue with one of your scripts. Does a blank scene cause the freeze also?

Unity serializes the scene on play and you may have some kind of infinate reference or something else it’s getting stuck on.

Way to check - comment out, delete scripts until it works again. Find the script that is stopping it and post it back here for help on the issue.

It could also be error reports, if you have somthing that is producing a ton of error or print messages a second it tends to freeze mine for the most part, try using yeild; to restrict scripts like that.

It turns out this was because there was a coroutine hanging indefinitely because our webserver had changed addresses. An update to the correct URL was all that was needed.