Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Stuck "Compiling Scripts" on launch - 4.6 and Yosemite Mac OS X

Discussion in 'Editor & General Support' started by Voidworx, Nov 28, 2014.

  1. Voidworx

    Voidworx

    Joined:
    Jun 9, 2013
    Posts:
    7
    (Moving this over from the Beta Thread. Still having the same issue after cleaning and installing the fresh 4.6 installer. Sorry for the cross post, but I think my post is in the right place now. Correct me if I'm wrong. Thanks!)

    Hello everyone. I'm not sure if this is a bug or just a peculiarity of my rig, but I figured I'd post here to see what you thought.

    Symptoms:
    My Unity 4.6 installation is hanging at "Compiling Scripts" at launch.

    Environment:
    I'm working on a 2013 Mac Pro, recently upgraded to Yosemite OS X 10.10.1.

    Logs:
    In Editor.log I see "Task failed: Verifier Task" as the last line.

    Workaround:
    If I launch Unity from terminal as root, it works.
    cd /Applications/Unity/Unity.app/Contents/MacOS
    sudo -b ./Unity

    Additional info:
    I have 4.6 running successfully on my Air, but it is still running Mavericks.
    Previously, on my Pro, I had 4.5 installed. When I removed it prior to installing 4.6, I failed to remove the /Library/Application Support/Unity license file. When launching 4.6 the first time, it bailed with permissions problems trying to backup the file. I trashed 4.6, trashed the app support Unity folder, reinstalled Unity, and it created the proper license file. But I'm still getting the hang on Compiling scripts. Leads me to believe its all a permissions problem, but everything looks the same as other apps.

    Does anyone have any suggestions or pointers to diagnose? I'm still learning my way around OS X (been a Mac user for about 9 months, coming from Windows.)

    Thanks!
    -Eric
     
  2. Voidworx

    Voidworx

    Joined:
    Jun 9, 2013
    Posts:
    7
    Update: Still broken for me. Reinstalled Yosemite via the safe boot, but that didn't fix it. Anybody else experiencing this or have any suggestions?
     
  3. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    428
    I don't think it's a MAC-specific problem. I'm having almost the exact same problem on Windows and I am also getting the "Task Failed: Verifier Task " error in my editor.log file. The only problem is that mine doesn't crash immediately on load, nor does it get hung up at "compiling scripts". Mine, however, will run the editor just fine. The only time it ever happens for me is if I edit a script after I've played the game once already. For example, if I click the Play button at the top of Unity, it will play fine the first time. If I stop the game, edit a script, and press "Play" again it just hangs there forever until I kill the Unity.exe process in my Task Manager.

    I've been working really hard on my game and would really like to NOT have to abandon my project due to a fault in Unity.

    My project is over 3gb in size, and since I don't know exactly which asset (if any) is causing the error, I don't know what to exclude from the bug report. I know I don't want to send you guys a 3gb file, though. I doubt it would ever get looked at lol.
     
  4. Voidworx

    Voidworx

    Joined:
    Jun 9, 2013
    Posts:
    7
    Wow.. Thanks for replying. It's discouraging to hear it may not be only Mac related.

    I just did a deeper clean, trying to remove *every* file that could point to Unity. Did a "sudo find / -name *unity*" and killed every directory/file that was part of Unity3D. Then, I used the Disk Utility in Recovery Mode to reset bad file permissions (although nothing looked painfully obvious.) Rebooted, reinstalled Unity.

    I get the license screen and then the "Assets Progress" window and "Compiling scripts..." This is so frustrating. I was looking forward to using Unity for this weekend's Ludum Dare event, but if I can't get this straightened out, I guess I'll have to find another platform.

    (Edited for spelling/grammar.)
     
  5. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    428
    There's a pretty good discussion going on about what I think may be the same issue. I'll post the link below. Pretty much, it may be an issue with unity trying to compile your materials. It COULD be one of Unity's default shaders that aren't compiling for you.. I don't know yet... I'll definitely keep you posted.

    http://forum.unity3d.com/threads/compilation-errors-again.278800/#post-1869318
     
  6. andersemil

    andersemil

    Joined:
    Feb 2, 2015
    Posts:
    53
    Still seeing this issue today. Some days I will not get any problems, other days it will hang 10 times on random script changes.

    Using Unity 4.6.3f1 on OS X 10.10.2
     
  7. Nic-Cusworth

    Nic-Cusworth

    Joined:
    Oct 12, 2008
    Posts:
    218
    I'm also getting this issue and it's really driving me nuts today. It's been happening for a least 4 months now on and off but today, every time I make an edit to a script it crashes when the Editor when it comes the end of it's compile and I have to Force Quit the editor.

    I'm on Unity 4.6.8f1 Pro and Yosemite 10.10.5

    It was happening on 10.9 too - I upgraded to Yosemite recently just to see if it fixed the problem.

    I really can go days without it happening and then I have days like today where it's nearly impossible to work.

    EDIT: Looking at the log file it's hanging here:

    - starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll, for buildtarget 4
    - starting compile Library/ScriptAssemblies/Assembly-UnityScript-Editor.dll, for buildtarget 4
    - Finished compile Library/ScriptAssemblies/Assembly-UnityScript-Editor.dll
    - Finished compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
    Reloading assemblies after finishing script compilation.
    Begin MonoManager ReloadAssembly
     
    Last edited: Sep 6, 2015
  8. Nic-Cusworth

    Nic-Cusworth

    Joined:
    Oct 12, 2008
    Posts:
    218
    Okay - a bit of an update on my problems that will hopefully help anyone struggling with this issue.

    I've dug around the forums and found this error to be anything from material compliation to starting a coroutine in the Awake function. I found a lot of posts about sockets remaining open after you stop the play mode which led me to look at my server code.

    I'm using PUN and AWS. Turning off the scripts that load of the server at the start of the game stopped the editor from crashing when I compile a script after play.

    Digging down a little deeper I found PUN was behaving itself but I added a little bit of tidying up up OnApplicationQuit().

    Code (CSharp):
    1.     void OnApplicationQuit()
    2.     {
    3.         Debug.Log ("Shutting down Photon");
    4.         PhotonNetwork.Disconnect();
    5.         Debug.Log ("Collecting Garbage");
    6.         System.GC.Collect();
    7.     }
    8.  
    I'm doing a Garbage Collection because I read somewhere that people felt the editor was crashing on GC with the recompile.

    What I REALLY think was causing me problems was shutting down AWS. I hope I've fixed this with this code:

    Code (CSharp):
    1.     void OnApplicationQuit()
    2.     {
    3.         syncPlayerData();
    4.         playerInfo.ClearAllDelegates();
    5.         System.GC.Collect();
    6.     }
    I'm thinking it's the delegates that AWS sets up that might be causing the problems so I'm clearing them and doing another GC just because...

    I do a blank error in the console (very useful) the first time I compile a script after play but it doesn't seem to be crashing at the moment.

    Will post more when I know more.