My computer is always on.
Unity is always on.
Recently I’ve been doing animation work, and falling asleep with the animator window open.
When I wake up, (8 hours later or so) Unity is constantly updating (a pop up comes up that says "hold on " for about 2 seconds, then goes away, then 10 seconds later it pops up again)
I checked the memory usage, and it is up to 13+ GB, it was nothing like that when I went to bed.
My usual set up has the animator window as one of the windows, (I always have Game, Scene,A bunch of shadergraphs, Heirarchy, Inspector, Project, Console, and Animator windows active, and Animator is usually hidden)
Now that I think about it, it is also what was causing this issue for me:
I tried to blame shadergraph, but noticed sometimes even with little shadergraph work, this happened. However, I was also using animator at the time when I was working on my complex shader.
This memory leak has been occurring for at least a year, because I remember waking up to the same thing at least a year ago a couple of times.
For this to occur, the animator window has to be visible. If it is hidden/covered by another window, the bug does not occur.
Was googling this because I just upgraded from 2019.1 to 2020.3 LTS and now when I have the animator window open (it may only happen with animator controllers with a lot of states?) Unity starts to hang every few seconds, first for about a half a second of frames dropped, then for a second, and eventually it starts being unresponsive for quite a long time every few seconds.
Switching scenes doesn’t seem to fix it, closing the animator window doesn’t fix it. Will test out workarounds like reloading editor layout. Let us know if anyone else has discovered anything.
Definitely possible, I’m not going to argue I know the underlying cause of a bug I’ve just run into.
But I think there are clearly some similarities here, which may have been harder to see because I left out some important detail in my first post.
Like Ne0mega, my issue:
-Only happens when the animator window is open and visible.
-When the window is open, windows reports the Unity Editor’s memory use skyrocketing, as in Ne0mega’s issue. It goes up about a gigabyte every couple of minutes in my case.
-This memory does not get released by the editor after closing the animator window.
-This is accompanied by the editor freezing every few seconds. At first the freezes are short, but the longer the animator window is left visible, the longer the freezes become.
-Eventually the freezes become long enough that an editor busy popup flashes on screen, as in Ne0gema’s issue. I haven’t tried falling asleep and leaving my editor open for hours.
-According to Ne0mega, the issue has been happening for at least a year, which would include unity 2020.3 releases, the version I’m using.
I did briefly last night, and it looked like garbage collections may have been happening with the freezes. Once I get some work done today I’ll collect actual data on it.