Search Unity

Unity 4.5 crashes every time I hit play (for the second time) - MacBook Air

Discussion in 'Editor & General Support' started by carmine, Aug 20, 2014.

  1. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    4.3.2 worked fine on my MacbookAir. However, when 4.5 came out. It crashed consistently (when I hit "play/run" on top the second time (first time seems to work). I tried the new 4.5.3 version and I'm still having this issue.

    UPDATE: 4.6.1 is fine!

    UPDATE: Tried 4.6 beta (17) and exact same thing is still happening.

    UPDATE: I have traced it down to an Application.LoadLevel causing the crash. If I use LoadLevelAsync, it's fine.

    OSX 10.9.4
    Proc: 1.86GHZ Intel Core DUO
    Memory - 4GB

    I saw the other post about the USB PS3 controller. I unplugged any USB devices and monitors, etc. so I'm just using the power cable and I still have this issue every time I hit play the second time.

    Any ideas?

    -Carmine
     
    Last edited: Jan 26, 2015
  2. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    This is now happening on my desktop Mac Mini also. Is there any way I can research this or get help?
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Does this happen on every project/scene? Including blank ones?

    You can open /Applications/Utilities/Console.app and get a crash report from in there somewhere.
     
  4. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Is does not crash on an empty scene.

    Do you know where I would look for the crash report?

    -Carmine
     
  5. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    ~/Library/Logs/Unity/Editor.

    If it does not crash on an empty scene, then one of your scripts is most likely doing something it shouldn't. If you dig through the log you should find an exception recorded, and if you're lucky it'll point you right to the problematic script.
     
  6. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    This first one is where it fails, and I have it succeeding at the bottom...

    Packing sprites:
    - Skipping packing - Sprite Packer is off.
    Reloading assemblies for play mode.
    Begin MonoManager ReloadAssembly
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/Unity.Locator.dll (this message is harmless)
    Registering custom dll's ...
    Non platform assembly: data-0x1e463200 (this message is harmless)
    Non platform assembly: data-0x6270e00 (this message is harmless)
    Non platform assembly: data-0x17665000 (this message is harmless)
    Non platform assembly: data-0x176c4000 (this message is harmless)
    Non platform assembly: data-0x17800000 (this message is harmless)
    Non platform assembly: data-0x61c2c00 (this message is harmless)
    Non platform assembly: data-0x176c4000 (this message is harmless)

    ...Ignoring platform specific dll: Assets/Plugins/Metro/Photon3Unity3D.dll

    ...Ignoring platform specific dll: Assets/Plugins/WP8/Photon3Unity3D.dll
    Non platform assembly: data-0x13ae2600 (this message is harmless)
    Register platform support module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll
    Register platform support module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll
    Register platform support module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll
    Registered in 0.053825 seconds.
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript-Editor.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Library/ScriptAssemblies/Assembly-UnityScript-Editor.dll into Unity Child Domain
    Platform assembly: /Applications/Unity/Unity.app/Contents/PackageManager/Unity/PackageManager/4.5.3/Unity.PackageManager.dll (this message is harmless)
    Loading /Applications/Unity/Unity.app/Contents/PackageManager/Unity/PackageManager/4.5.3/Unity.PackageManager.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Assets/NGUI/DLLs/NGUI.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Assets/NGUI/DLLs/NGUI.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Assets/NGUI/DLLs/Editor/NGUI_Editor.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Assets/NGUI/DLLs/Editor/NGUI_Editor.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Assets/Photon Unity Networking/Editor/PhotonNetwork/Newtonsoft.Json.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Assets/Photon Unity Networking/Editor/PhotonNetwork/Newtonsoft.Json.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Assets/Plugins/Photon3Unity3D.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Assets/Plugins/Photon3Unity3D.dll into Unity Child Domain
    Non platform assembly: /Data/Development/SpaceGame/Assets/Turrets/Scripts/UnityExtender.dll (this message is harmless)
    Loading /Data/Development/SpaceGame/Assets/Turrets/Scripts/UnityExtender.dll into Unity Child Domain
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll (this message is harmless)
    Loading /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll into Unity Child Domain
    Non platform assembly: /Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll (this message is harmless)
    Loading /Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll into Unity Child Domain
    Non platform assembly: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll (this message is harmless)
    Loading /Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll into Unity Child Domain
    Non platform assembly: /Applications/Unity/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll (this message is harmless)
    Loading /Applications/Unity/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll into Unity Child Domain
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/Unity.DataContract.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/System.Core.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/Unity.IvyParser.dll (this message is harmless)
    Initializing Unity.PackageManager (PackageManager) v4.5.3 for Unity v4.5.3
    ReleaseAllScriptCaches did not release all script caches!

    (Filename: /Applications/buildAgent/work/d63dfc6385190b60/Runtime/Mono/MonoManager.cpp Line: 1351)

    Remaining caches:
    UnityEngine:UnityEngine:GUISkin


    -- It just hangs there --
    Now if I look at a successful run...


    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/Unity.IvyParser.dll (this message is harmless)
    Initializing Unity.PackageManager (PackageManager) v4.5.3 for Unity v4.5.3
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/nunit.framework.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/Mono.Cecil.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/UnityScript.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Managed/ICSharpCode.NRefactory.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/Boo.Lang.dll (this message is harmless)
    Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/UnityScript.Lang.dll (this message is harmless)

    ----- Total AssetImport time: 0.052889s, AssetImport time: 0.000001s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
     
  7. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    I've downloaded the 4.6 (17) beta. I'm still getting a crash every time I hit play for the second time. Can anyone help?
     
  8. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    Carmine, do you activate/deactivate/instantiate terrains ? I have a similar issue where my scene crashs when the terrain gameobject gets activated/deactivated - but only happens on MAC, it freezes completely.
     
  9. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Nope. I traced it down to an Application.LoadLevel. For some reason if I had it as Application.LoadLevelAsync it worked fine.
     
  10. UnityFS

    UnityFS

    Joined:
    Feb 10, 2013
    Posts:
    127
    Are you using plugins? You may find you are having this issue if the DLL is not being unloaded correctly ( thread remaining open for example )
     
  11. geniusz

    geniusz

    Joined:
    Nov 21, 2014
    Posts:
    38
    My issue is because I call Resources.Load inside ISerializationCallbackReceiver.OnBeforeSerialize.
    The console shows "ReleaseAllScriptCaches did not release all script caches!" when the next time I hit play.
     
  12. roger-cheng

    roger-cheng

    Joined:
    Mar 15, 2013
    Posts:
    5
    Hey, I encountered the same problem, and found a solution to this.
    when you open you editor, the first thing to do is opening another scene, for example a GUI scene (not your start scene).
    Then click "play" to run the other scene, then stop running. Then click "play" and stop again.
    After finishing that , you can switch to your start scene, and editor won't crash anymore.
    But you should repeat these steps after you close editor and open it again .
     
  13. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Carmine, did you submit a bug using the Bug Reporter? What is the bug id?
     
  14. tedd-hansen

    tedd-hansen

    Joined:
    Oct 26, 2014
    Posts:
    3
    Thats amazing. I have had the problem for quite some time now. Every time I start Unity 4.6, play, stop, then start again Unity would simply freeze. One of the unity thread used max CPU. I've rewritten my background thread (think threadpool) system 4 times now and finally concluded that it was _not_ causing the problem (I do abort all my threads properly OnApplicationQuit). So I decided to Google some more, came across this unlikely explanation and tried it: Start Unity, new scene, play, stop, play, stop, load my previous scene, play, stop, play, stop, play, stop. No freezing. Thanks. :)
     
  15. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Has this been fixed in 4.6.1 dude?
     
  16. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Seems to be ok now.