Unity 4.3 crashes on Mac when debugging on Monodevelop 4.0.1

Unity Editor 4.3 consistently crashes when debugging on Monodevelop-Unity 4.0.1 on OSX 10.8.5 (Mac)

Make sure the options at File/Build Settings / “Development Build” and “Script Debugging” are ticked.
If we ‘attach to process’ in Monodevelop, and then press the play button on the Unity Editor, Unity will freeze. Monodevelop still works but adding breakpoints, stepping through code, playing and pausing, all stop working. Detaching process doesn’t bring Unity back, the only way is to Force Quit.

Sometimes if we press the play button in the Unity Editor first, and attach to process after, then debugging starts to work as expected.

I know at least one other person having the same issue on a Mac since updating to Unity 4.3. It seems to work fine on Windows.

Is anybody else having the same issue? Can anyone recommend a hotfix / workaround?

Same problem here on Mountain Lion. Completely unusable :/

I've sent a bug report to Unity, still waiting to hear from them. It'd be good to know if this is affecting all Mac users, or just Mountain Lion users, or maybe just us?

Same problem on Mavericks.

Hasn't it always done this?

I am another Mac user running into this. Running Mountain Lion.

4 Answers

4

Update: here’s the reply about the bug report I’ve submitted:

“We have identified this it as a duplicate of an existing known bug and we will be closing the issue. The information you have supplied will help us further in the resolution.”

I hope they give this the proper priority, this is a BIG issue if it’s affecting every Mac user. I’m surprised they even decided to release it like this, they should have shipped Unity 4.3 with the previous version of Monodevelop, at least that (kind of) worked.

The dark ages of development… No debugging. What info did you send? It doesn't present any crash report for me. Do you have the original issue number so I could send some logs and file a bug report too?

I think that was just a standard reply. I didn't submit any error logs, just told them the steps to reproduce the error: attach to process, hit play... I don't think that will really "help them further resolution" in any way. If you want to report the bug as well, just open the Unity Bug Reporter app, you can find it on your Unity installation folder. Let's add to the pressure!

As our entire outfit runs out Macs we've had to revert to 4.2.2. I've sent numerous error reports to them, and if everyone has been doing the same then hopefully the spam will make them notice soon enough. It's a pity because I prefer the look of the new Monodevelop...

@Datael: Check the comments below, the issue appears to have been fixed on 4.3.1

No it hasn't. Test it!

I know this is not a final answer, but a work around. I was researching this same problem and came across this post where someone was trying to port MD 4.0 to be used with Unity:

http://www.cliffordroche.ca/monodevelop-4-xamarin-studio-debugging-in-unity/

You can read about half way down where they talk about it not working well with Unity 4.x. They mention that if you Play your scene BEFORE you attach MD for debugging and then detach BEFORE you stop playing then it doesn’t hang Unity. I found this to work.

It is a major pain in the butt, but at least you can debug.

I hope they fix the root problem soon.

I find it works ok so long as the code does not recompile while the debugger is attached. So I can debug Start methods. Specifically I don't build the project in MD.

Thanks for the tips, I'll try that. On another note don't expect a fix soon, has been around for a while it seems… [http://forum.unity3d.com/threads/183516-4-1-3-crash-when-hitting-monodevelop-breakpoint-on-OSX][1] Maybe it gets fixed in version 6? I hope you guys didn't buy the pro version :/ [1]: http://forum.unity3d.com/threads/183516-4-1-3-crash-when-hitting-monodevelop-breakpoint-on-OSX

For those who don't know this has been fixed in version 4.3.1.

Nope. Hasn't been fixed completely. Still crashes for me and my coworkers all the time when debugging.

Well, this is dang weird. The other day when I saw the 4.3.1 version and that fixing this crash was in the list of fixes I downloaded it, installed it and did some testing and it was all working fine. It didn't lock up anymore. Now I go to double check after reading this post and it locks up again. No idea what changed.

,I am using Xamarin, it seems to be a little bit more stable, but crashes as well too often.

I’ve been using the following procedure that seems to work.

TO BEGIN DEBUGGING

On the Unity3d IDE

  1. Go to Assets->Sync MonoDevelop Project.
  2. Start the game. The game must be started before doing anything on MonoDevelop! This is the key step that works.

On MonoDevelop.

  1. Attach MonoDevelop to the Unity Editor. Press the play button situated in the top left of the MonoDevelop IDE.

TO STOP DEBUGGING
On MonoDevelop

  1. Detach MonoDevelop (press the square button situated top left). Do this before stopping the game, etc. on the IDE