Unity Editor hangs for minutes on certain executions

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.

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

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)

I have the same problem on 2020.2.5, so I suppose this is a bug that should be reported.

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 /Library/ShaderCache.db file was 9 GB in size! I removed it and the issue dissapeared.

2 Likes

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.

Other people are pretty furious about this as well.
Lots of busy... Hold on.... etc? page-5

Mine is also 15GB, but when I remove it on restart it at least climbs up to 9.

It somehow resolved itself it might be due to me resetting the workspace and only then deleting the ShaderCache.db, hasn’t happened since.

1 Like

What do you mean by “resetting the workspace”?

This option:

2 Likes

LOL mine was 73Gb!!!

Hopefully removing it helps.

Edit: Massive improvement, the DB is now under 2Mb…

Getting this on 2030.3.0f1 when clicking on materials in the Inspector window

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

Deleting ShaderCache.db also seemed to work, mine had grown to 9gb.

1 Like

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?

2 Likes