Search Unity

Editor Crashes Upon Compiling scripts

Discussion in 'Editor & General Support' started by Dark-Protocol, May 22, 2013.

  1. Dark-Protocol

    Dark-Protocol

    Joined:
    Nov 19, 2011
    Posts:
    279
    Lately the Unity editor started crashing almost every time it has to compile the scripts. Sometimes this would go away for a while but then reapear again. I've been trying to work this out for a few days now and I still haven't managed to fix it.

    This is the stacktrace that the editor outputs when it crashes:

    I am currently with version 4.1.2.f1. I tried reinstalling it but that didn't fix the problem. I'm using some additional dlls (fmodex.dll and fmod_event.dll).
     
  2. ottolb

    ottolb

    Joined:
    Jul 1, 2009
    Posts:
    42
    I don't know if it's the same issue that I was having. I'm using Mac and Unity 4.1.2
    I was working in a project and then Unity crashed when tried to compile a script. The next time I opened it, unity always crashed when tried to compile Assembly-CSharp.dll
    Here is the console message:
    - starting compile Library/ScriptAssemblies/Assembly-CSharp.dll, for buildtarget 4

    Then I tried to open several times, delete library foder, reinstalling Unity, no lucky.

    The problem was that unity created a process to compile 'Library/ScriptAssemblies/Assembly-CSharp.dll' named 'mono' and was using the dlls.
    I just had to restart computer or you could finish mono process manually.
     
  3. Dark-Protocol

    Dark-Protocol

    Joined:
    Nov 19, 2011
    Posts:
    279
    Thanks for the answer!
    I guess my case is different, because this doesn't help. I'm using Unity under Windows 7 by the way, sorry for not mentioning it. After it crashes and I open it again, Unity will compile the scripts at the startup screen and it will run fine. Then eventually when it has to compile something it will crash again. It doesn't always crash, however but sure slows me down as hell.
     
  4. duncanx

    duncanx

    Joined:
    Feb 12, 2011
    Posts:
    45
    This happening all the time now. I'm not sure if it's related to project complexity or the 4.2.0f4 release, but it's very destructive to productivity. About 50% of the time, the editor crashes upon recompiling the scripts. Even the smallest change, such as adding a whitespace to the file...50% chance will crash the editor.

    win7 64.
     
  5. neoRiley

    neoRiley

    Joined:
    Dec 12, 2008
    Posts:
    162
    Unity would beachball when getting to the compling scripts part of the progressbar. Reboot was the only thing that fixed it.
     
  6. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    56
    Almost two years later and I'm in the same predicament with Unity 5.

    A few days ago Unity has started freezing every 3rd compile or so. Restarting didn't help.

    Still have a long ways to go with this project. Wish I knew what to do about this.

    Unity 5, Windows 7 64-bit.
     
  7. TwILeK

    TwILeK

    Joined:
    Sep 17, 2014
    Posts:
    54
  8. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    56
    I finally figured it out my problem on accident a month later. Yep, a month.

    The 3rd party library "PUN" freezes the main thread when a connection is abandoned (i.e. not disconnected upon closing or "leaked").

    I suspect that a compile or a second attempt to play often triggers a garbage collection that locks up the editor. Most likely a problem with unmanaged resources not being disposed.
     
    Jason-Michael and rubicon_xing like this.
  9. rubicon_xing

    rubicon_xing

    Joined:
    Nov 30, 2012
    Posts:
    10
    Now that you've found the problem, did you managed to find a solution?
     
  10. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    For anyone who's as stupid as I am and found this thread. I found that giving a MonoBehaviour a SyncVar attribute causes the same issue as described above.
     
  11. joshua123asd

    joshua123asd

    Joined:
    Jun 26, 2014
    Posts:
    3
    Had the same issue when I tried to create an instance of a custom class in a class that inherited from MessageBase.
     
    lihail123 likes this.
  12. lihail123

    lihail123

    Joined:
    Feb 4, 2020
    Posts:
    9
    Did anyone find a solution to this?
     
  13. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    Crash fest continues on!
     
    mertbsn likes this.
  14. masuelele

    masuelele

    Joined:
    Nov 25, 2022
    Posts:
    2
    Looks like support works so much on unity....