- Home /
Crash on Mac, when switching application
We have built a fairly large framework for the base of our games. We have no issue on PC... However, our mac user experience crashes when switching application after adding part of our framework to their scene.
Steps;
Launch Unity with our framework
Add object, component, script and so on.
Run the game. Stop the game. Continue working in Unity.
Up to that point, everything is fine and work as expected.
Then if he switches application, any application, Unity crashes right away. (Application is not responding) A crash report shows up and we must force quit Unity. If he switches application before the first 3 steps, Unity doesn't crash.
Find the CRASH! entry in the crash logs and see what are the entries before it.
From what we got: "Receiving unhandled NULL exception"
Unloading 1180 unused Assets to reduce memory usage. Loaded Objects now: 734.
Total: 20.991100 ms (FindLiveObjects: 0.125533 ms CreateObject$$anonymous$$apping: 0.023617 ms $$anonymous$$arkObjects: 1.203709 ms DeleteObjects: 6.829594 ms)
System memory in use before: 53.9 $$anonymous$$B.
Unloading 1 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 52.1 $$anonymous$$B.
Unloading 499 unused Assets to reduce memory usage. Loaded Objects now: 1349.
Total: 9.585827 ms (FindLiveObjects: 0.097193 ms CreateObject$$anonymous$$apping: 0.023032 ms $$anonymous$$arkObjects: 3.686626 ms DeleteObjects: 1.440732 ms)
Receiving unhandled NULL exception
Launching bug reporter
*** Launching bug reporter due to crashbug.
Obtained 0 stack frames.
$$anonymous$$aybe I'm looking at the wrong files?
Did you look through the other files?
Did you actually find the line : "Crash!"
Answer by LightStriker · Oct 28, 2013 at 02:23 PM
Well, found out why.
We had a .dll that used System.Windows.Form to get Mouse position when being outside the OnGUI() scope. Sadly, on Mac, calling this - while it does work properly - also creates a crash after the editor switched playstates and you switch application in Mac OSX.
As a work around, we had to implement three different ways of gathering mouse position depending of the tool context; EditorWindow, SceneView and Inspector.
Your answer
Follow this Question
Related Questions
How can I completly remove all traces of Unity from OSX? 2 Answers
A node in a childnode? 1 Answer
Unity Webplayer doesn't work on Mac? 3 Answers
SIGABRT on OS X 0 Answers
Mac build crashes on start up 1 Answer