Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Bug Animator window causes some kind of memory leak (2021.1.5f1)

Discussion in 'Animation' started by Ne0mega, Jul 6, 2021.

  1. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    472
    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:
    https://forum.unity.com/threads/force-editor-to-release-memory.884761/#post-6984437

    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.
     
    Last edited: Jul 7, 2021
    Alic likes this.
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,768
    Report a bug via the Help menu.
     
  3. KalOBrien

    KalOBrien

    Unity Technologies

    Joined:
    Apr 20, 2021
    Posts:
    61
    Please file a bug report via Help->Report a Bug.
    I'll highlight this to the team.
     
  4. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    135
    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.
     
    Last edited: Jul 25, 2021
  5. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,768
    That sounds like a completely different issue to the one this thread's about.
     
  6. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    135
    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.
     
    Last edited: Jul 26, 2021
  7. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,768
    Have you tried running the Profiler with Profile Editor enabled?
     
  8. Alic

    Alic

    Joined:
    Aug 6, 2013
    Posts:
    135
    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.
     
unityunity