Search Unity

Unity Editor hangs for minutes on certain executions

Discussion in 'Editor & General Support' started by Blenderik, Feb 17, 2021.

  1. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    Sometimes a click causes a hold on, busy dialog to appear that can last several minutes (!).
    One dialog said: Application.ExecuteMenuItem, another one InspectorWindow.MouseDown.
    I have no custom UI buttons or editor scripts running.
    Sometimes it's when I return from the code editor and quickly click something, sometimes it's when I double click on a script to edit it. I'll keep an eye out for pin-pointing it, but it's really annoying.
     
    Last edited: Feb 17, 2021
  2. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    I found a way to reproduce it every the time. I switched to URP for performance on mobile. When I click on the shader inside a material in order to change it, Editor hangs for 3+min.
    To my knowledge this only happened after I upgraded to 2020.3
     
    Last edited: Feb 19, 2021
  3. dforstmaier

    dforstmaier

    Joined:
    Oct 5, 2016
    Posts:
    13
    Strange, I experience the very same thing after I wanted to test my URP game on mobile. I don't know what exactly I did but now I also experience very long hangs with InspectorWindow.MouseDown everytime I want to change the shader inside a material. I'm using Unity 2020.2.2 though.

    Update: After performing a Reimport All it seems to be ok again (though there is a delay of one second after clicking, but that's not that tragic and I don't know how fast it was before)
     
  4. UniOwl

    UniOwl

    Joined:
    May 31, 2018
    Posts:
    24
    I have the same problem on 2020.2.5, so I suppose this is a bug that should be reported.
     
  5. UniOwl

    UniOwl

    Joined:
    May 31, 2018
    Posts:
    24
    I tried to reproduce the bug I expirienced on my main project creating a blank one, but failed. Then I found that my project was ~15 GB in total. After some searching I found out that my <Project>/Library/ShaderCache.db file was 9 GB in size! I removed it and the issue dissapeared.
     
    EvilDecision and dforstmaier like this.
  6. dforstmaier

    dforstmaier

    Joined:
    Oct 5, 2016
    Posts:
    13
    Funny, I just wanted to tell you the exact same thing as I found that out in parallel. My ShaderCache.db was 22gb and after reading https://docs.unity3d.com/Manual/class-Shader.html I also know why. I experienced a lot with different shaders, variants and targets.
     
  7. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
  8. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    Mine is also 15GB, but when I remove it on restart it at least climbs up to 9.
     
  9. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    It somehow resolved itself it might be due to me resetting the workspace and only then deleting the ShaderCache.db, hasn't happened since.
     
    Drago28 likes this.
  10. dforstmaier

    dforstmaier

    Joined:
    Oct 5, 2016
    Posts:
    13
    What do you mean by "resetting the workspace"?
     
  11. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    This option:
    upload_2021-3-3_17-38-1.png
     
    Drago28 and dforstmaier like this.
  12. LeRondPoint

    LeRondPoint

    Joined:
    Jan 22, 2021
    Posts:
    10
    LOL mine was 73Gb!!!!

    Hopefully removing it helps.

    Edit: Massive improvement, the DB is now under 2Mb...
     
    Last edited: Mar 23, 2021
  13. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Getting this on 2030.3.0f1 when clicking on materials in the Inspector window

    upload_2021-3-31_20-49-18.png

    Deleting ShaderCache.db also seemed to work, mine had grown to 9gb.
     
    KarlKarl2000 likes this.
  14. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    We recently moved to 2020.3.3, as the LTS version is now out.
    We encounter a lots of wait and hold randomly across the project, I think we got all the popup that show on this thread.
    Unfortunately there is no way to know what is causing the issue (editor hang) no logs etc... We can't go back to 2019. Also it's seem random, sometimes in happen when we save a scene, sometimes not.

    Like many Unity bugs, it's not possible for us to send a repro project, as it only happen in our project (and it's too big to send anyway). What can we do?

    How Unity could release this version as LTS? This is a major bug and our team are losing a lot of time waiting for every random actions.

    Edit: This one below is the worst, happen every 2-3 saves and lock the editor for 3-5min.

    Anyone know a solution?
     
    Last edited: Apr 18, 2021
    futurlab_peterh and kyuskoj like this.