Editor Progress Bar stalls (request for bug reports)

I think the dev team still don’t understand what people are posting here about. Is not about unity being “slow”

The issue is the editor will randomly show the loading bar for 10 minutes and more at the time, while doing nothing, it doesn’t process some heavy operation or something that takes time, it just waits for something internally, then after minutes ( 8, 10 or more minutes) pass will unfreeze, and you can continue to work till the next time it happens which usually is 2 or 3 times an hour.

So again, the user did not select a heavy operation (like lighting bake or similar) the user will just click in the editor window, or select a prefab, or change a value in the properties panel, stuff like this.

then boom, unity will show the loading bar for 10 (around) minutes and will wait for some internal click that will unfreeze the editor.

This will not happen with all projects BUT once it starts happening that project is busted. On the same computer different projects will work fine at least till they may or may not get hit by this bug.

From my experience unity will work with that project for days with no issue before this loading bar happens. And no changes were made to the project that justify the issue (the same assets, scripts, ecc, are present nothing added that could break)

Said this, I understand perfectly that is hard to pin point what is the issue because I removed assets, added assets, updated packages, ecc to understand what could be. If something fix it. I think other users did this too.

One thing I suggest is looking into how unity editor passes events inside the unity itself (maybe related with unity UI), maybe something breaks and the event are not sent or received correctly.

Second thing I suggest that maybe unity is trying to re-import or check all assets inside the project because it thinks that they are out of date or that the assets had been changed.

4 Likes

There definitely does seem to be something wrong in the UI. I do a lot of rearranging, which is fine, until it isn’t. Then all hell breaks loose, and all caches and everything needs to be purged to get a responsive Unity Editor back. Visual failings in the Inspector are the first signs this is about to happen. The Add Component button being stuck right at the bottom the very first sign.

This is certainly it, adding and removing the exact same comment from my project over and over can produce anywhere from 13sec to 50secs of waiting each time, no consistency. Also having my project locked by the window is crazy, I can’t even navigate to the next file I want to work on or do anything while it does all this “Holding on” which is really terrible for keeping workflow alive.

5 Likes

Usually I have console warnings disabled so I can’t tell if this happend in the past the same way, but I just hit save and had to wait 1.5min, which is quite common by now. Every fifth or thenth time I hit save, I have to wait about 90seconds or more.

Now, because I enabled console warnings, I got this message:
Importer(NativeFormatImporter) generated inconsistent result for asset(guid:d40210d5ceb6a31458fb31aaaae01411) "Assets/0 Systems/0 Classes/Enemy/BehaviourTrees/Resources/BT_VariableDB.asset"

I didn’t modify our BT_VariableDB.asset, I didn’t even look at it. I got 3 other warnings of this type. I get them almost every single time I hit save but sometimes it takes forever.
As this is the only thing that pops up in the console, maybe that’s the cause of this lag?

I am just saving the same scenes over and over, modifying prefabs, which have absolutely no connection to the mentioned Database Assets, so I would expect the saving to be consistent.
Why does it sometimes take 1.5min to save the very same thing as before, when it just took 5 seconds?
This is so confusing, I can’t see any consistency in this behaviour, it doesn’t matter if I save scenes, assets, duplicate, it can happen at any time, at any operation.

+YES ! ! :smile:

Also if asset producers could have a similar pop up added into their own tools, that might be helpful in tracing down bugs faster?

Similar problem here - been happening for a while now- with very small changes to scriptable objects, every 5-10 saves it stalls for 90+ seconds. Seems even more often when duplicating scriptable objects or prefabs than saving.

2020.3.4f1, windows, perforce VC

edit: noticing it often when in prefab editing mode, and making changes to different prefab/scriptable objects

Did anyone on the Unity team, figure out why there’s a 2-3 second delay on everything?

The amount of times I exit \ enter play mode followed by the 2-3 second pause… Must add up to 30 minutes or so after a 16 hr work day :sweat_smile:

Is it me or does Unity go into sleep mode when it’s not in focus. (This includes entering play mode) … Thus the 2-3 second application.Tick after every action.

3 Likes

I don’t think it’s perforce because we use GIT.

Now I have a theory, can you share how big in MB or GB your biggest scene in your project is?

Does it look like this?
7485020--920858--upload_2021-9-10_2-58-38.png

Or do you have any other scriptableObject, Prefab or anything that has lots and lots of small data?
Giant lists of integers, Vector3s, any Mesh saved inside unity or a texture saved in a byte[ ] collection?

Because I think it has to do with the Undo System, specifically the Undo System trying to compare big files byte by byte.
I don’t know how I could test it. I tried to reproduce it but it didn’t work out. I saved images as byte arrays for a custom tool and the undo function led to long stalls. And when you duplicate (or save?), undos are generated.

Our scenes are pretty small (8-12MB). Some of them are serialized in binary, like what you are seeing there @John_Leorid and some are text. Asset Serialization mode is set to Force Text.

I will keep an eye open and see if the stalls happen in the context of both types of scenes.

I see the stalls when working with small data - no long arrays or lists.

Not sure if it’s relevant but I usually run with Domain Reloading off.

This isn’t really binary, it’s HEX, I think … which is strange because this is actually an integer array of mesh indices (definition of which 3 points are a triangle). We also have “Force Text” set in the serialization settings.

And we also have “Domain Reloading” and “Scene Reloading” turned off.

Yes, stalls happen when working with small objects, but I think the big objects are updated too, for some reason … or MAYBE it happens when an Undo Entry is cleared?
Undo has a limit, right? When you work on something big, then on lots of small stuff and the big undos get cleared from the list, maybe that produces a lot of garbage, leading to massive stalls?

It’s just a theory. Because in small projects (game jams) this never happens. It only happens once the project gets bigger. So it has to do with some assets.
I also checked for damaged assets, prefabs, missing GUIDs and so on, as far as I can tell, our assets & scenes are all OK, they don’t have any issues I can find.

Now I am waiting for V2021.2 to release, so I can use the Asset-Import-Editor that shows which assets get imported at which operation.

(also it seems to happen way more often to my colleague who is level designer)

When this problem was first pointed out, I remember seeing some threads pointing out the probuilder as possibly responsible for this delay in unity.:eyes:
As far as I know, this has already been fixed in a later version of the probuilder, but could it have been a new regression? it would be good to ask the probuilder team if they are aware of this, or if the probuilder might be causing this

One important point to note (all indications are that) the new 2022.1 Alpha does not have this workflow problem. it is as if the problem never existed.:face_with_spiral_eyes:

But the problem still persists in 2021.2 Beta

Changelog 2022.1 Alpha:
Undo System: Explorable undo history UI.

Maybe it really had to do with the undo system (in combination with meshes saved to scenes or otherwise small data)? IDK. Now I just have to wait about half a year to use 2022.1 and the problem will be gone xD Good to know xD

1 Like

I suspect also the new search tool contributes to slower performance. I get this process every time I exit \ enter play as well as exit \ enter prefab editting.

7490474--922100--Screenshot 2021-09-12 174146.jpg

what versions removed this " turn Off the async shader compilation" ?
that would be horrible

Note internally in shader graph when they compile shaders they also turn this off
for unity to remove this option is not good!!!

Today I started getting it in editor before I pressed play at all - makes me think Domain Reloading is unrelated. I haven’t worked (directly) on anything with big data sets today.

When the stall happens I see CPU use and memory spike on an editor sub-process; at the tail end of the stall there are big disk writes (probably several hundred MB). I didn’t expect the disk writes - almost like Unity is reserializing a bunch of stuff.

if unity is injecting new text/content in the assets then obviously it detects that assets had been changed and tries to re-import them.

then it gets into this vicious cycle of injecting stuff then re-importing.

explains why it doesn’t do this with all projects and once it starts doing it, the project is busted.

1 Like

Application.EnterPlayMode for infinity on around every 15-20th Playmode start on 2020.3.17f1. It’s quite frustrating and inconsistently random, only killing unity via taskmanager ends it.

1 Like

Case 1367176 ← Hope it helps.

7508969--925778--Screenshot 2021-09-20 133523.jpg

Every interaction causes Unity to pause for 3-16 seconds.

  • Load a new Scene - wait for Application.Tick for 3 - 16 seconds
  • Enter Play Mode - wait for Application.Tick for 3 - 16 seconds
  • Exit Play Mode - wait for Application.Tick for 3 - 16 seconds
  • Edit a VS script - return to Unity and wait for Application.Tick for 3 - 16 seconds
  • Import a 3d Blender model - return to Unity and wait for Application.Tick for 3 - 16 seconds
  • Fix a texture in Gimp - return to Unity and wait for Application.Tick for 3 - 16 seconds
  • Check email - return to Unity and wait for Application.Tick for 3 - 16 seconds
3 Likes

Hi,

i am confused… i’m using Unity 2021.1.17f1 for quite some time and it had this issue where it always did show Application.Tick, Application.Message bars and stuff… the editor wouldn’t even toggle fullscreen mode…

For some reason this just got fixed after i did “Reset All Layouts” and after this i did close the Console Window… it doesn’t seem normal closing the Console Window to be related to getting this fixed, but i previously did reset the Unity Layouts many times ( not sure if i’ve done it in 21.1.17f1 though) !

The editor for me now can be really quickly maximized and minimized even if in play mode ( like normal )… also these annoying messages are gone and the editor enters and exits play mode a bit faster without counting those extra seconds… So i don’t know what actually did fix the issue but i though this might give some idea to someone !

4 Likes