Mac OS Builds Crashing in Unity 5

I’ve just discovered a new issue since switching to Unity 5.

My project has no errors etc in the Editor - all works fine. When I create a Mac OS build however (Universal, x86_64, doesn’t matter), and then run the game - it consistently freezes when loading into new scenes, or sometimes once a scene is loaded and I click the mouse on a button or something. I have to Force Quit it to get out.

If I create a Development Build, it all works perfectly in the resulting app file.

Anyone experienced anything similar or maybe have some ideas on what might be causing it?

No ideas on this one? It’s got me fairly stumped.

Having the same issue here. Won’t run on my Mac which has OS X Yosemite using Unity 5.

Same sort of thing? Just random crashes?

Yes. I took your advice and did the development build option. I gave someone your answer here. Standalone Mac Build Crashes on OSX 10.10 - Questions & Answers - Unity Discussions It’s up to Unity to fix this among many other issues they have.

Please file a bug and we’ll take a look.

I was experiencing the same bug. My project was using the third party plugin NGUI and I replicated it by having two panels that activate and de-activate the two pannels with button presses. I could not replicate the same issue with Unity UI. Strangely, I was able to work around the issue with this little bit of code:

void OnGUI() {
GUI.contentColor = new Color(0f, 0f, 0f, 0f);
GUILayout.Label (“Test”);
}

Are you sure that the game is frozen? I experience something similar using Unity 5.0 on Mavericks. In the Editor my Arch Viz project works fine, but the exported build just stays black after the splash screen. The game is there however, since I can here the sound. CPU load goes up to 100% and I can only force-quit out.

In the Editor, I got another error: When I use LoadLevel(int) the pre-computed GI doesn’t kick in, all the colors are garbled.

Both errors go away when I use real-time lighting only.

I might try using a dev build in 5.0, then I will try 5.0.1 soon to see if the update improved things.

In my case, yes - the game freezes completely. It has to be “Force Killed” through Finder.

What’s interesting is that it seems to happen in the same spot in each scene where it happens. e.g. my “MainMenu” scene loads up fine and has no issues running. If I go into my “Credits” scene, it freezes almost immediately. If instead, I go into my “PartyBuilder” scene (I’m building an RPG), then it doesn’t freeze until I try to click a button.

The common element is NGUI. Maybe there is something going to there.

I’ll open a thread on the NGUI forum and link it back here just in case.

NGUI Forum thread:

Based on the response in the NGUI forum, this does appear to be a “Unity Issue”.

what was you bug number when you reported?

I haven’t reported it.

Yes I am seeing this a lot - last time I had to do a re-import all after forcing U5 to quit

The common element for me seems to be playing a scene and then quitting shortly afterwards - it freezes about 50% of the time.

N

We are having the exact same issue on a Mac OX 10.10, on Yosemite, it’s extremely hard to track and frustrating to debug. In our case we are using DFGUI.

The line Receiving unhandled NULL exception Obtained 10 stack frames. is printed in our logs but no stack frames are…

Has it been reported by someone yet? Otherwise I’ll do it.


@Rene-Damm @
P.-S. By the way, why is there a forum if you guys (Unity people) will not look at the problem until there is a bug reported? You lost 1 month of potential time to fix the issue, this is ridiculous and makes this forum useless.

P.-S. 2 - Is is the same for that thread Standalone Mac Build Crashes on OSX 10.10 - Questions & Answers - Unity Discussions, he haven’t reported a bug so it won’t be looked out? Another useless website?

Seriously that no one ever reported this bug?

Here it is my report, I really hope this can be fixed soon it really sux to use a Development Build in production…
http://fogbugz.unity3d.com/default.asp?700025_4frch38ju1921dga

Thanks @BigGreenPillow , since I had no reply from anyone else I should have reported it, but thank you for doing so.

I’ve just experienced this issue when moving back to an OS X build with Unity 5.1.0f3. The app just hangs when I click on an NGUI UIInput text field.

If you attach to the process in Xcode you can see that it is crashing somewhere after glDrawElements. I’ll upload the exact callstack as an image.

The workaround posted by @graum does indeed fix the issue for me so thankfully I have a solution until this has been tracked down.

void OnGUI() { 
GUI.contentColor = new Color(0f, 0f, 0f, 0f); 
GUILayout.Label ("Test"); 
}

Looks like this may have already been fixed but not yet available in the most recent build. http://fogbugz.unity3d.com/default.asp?700025_4frch38ju1921dga

The bug is still there. I’ve tried 5.2.0f2 (beta) and bug is partly resolved, i.e. it works only for x64 build.
We cannot send a final release to our publisher because of this. 5.1 is crashing and 5.2 is still beta.

Do you, by chance, know how to remove “development build” inscription?

PS: I’ve issued a bug report also: #722093

2 Likes

Same experience here with 5.1.2p1, the OSX standalone version runs only under Development Build, and I have no NGUI plugin in the project. To be honest, the project contains no plugins at all, but I am using a lot of Unity UI.