Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Memory Leak & OS Crash When Filtering Hierarchy View

Discussion in '2017.1 Beta' started by ProtonOne, Jun 12, 2017.

  1. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    If you use the Hierarchy view filter, there is a massive memory leak that will use up all your OS memory and crash the PC within a few seconds. Version 2017.1.0b9 Win 10

    Happens even on a fresh project, empty scene (with only Main Camera & Directional Light)

    Case # 919993

    Memory Leak

    Reproduction Steps

    1. Open the task manager and look at your Memory Tab (See BEFORE image)
    http://i.imgur.com/450pUI4.png

    2. Press Play
    3. Type a leter into the Hierarchy view to filter it

    Expected Result
    Memory should be stable

    Actual Resutlt
    Memory usage climbs very quickily.
    If you don't stop the program within a few seconds your PC will crash!
    You need to completely exit Unity to free up the memory.
     
    DMeville likes this.
  2. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    I'm experiencing this too. Same OS and version. Seems to happen while NOT in play mode too. Just typing something into the hierarchy view filter while in the editor made memory usage skyrocket and crashed in a few seconds.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
  4. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Just heard from Unity QA that they couldn't reproduce it. I just re-confirmed it does not happen in 2017.1.0b8 but it does happen every time for me in 2017.1.0b9.

    I've done a bit more searching, in addition to what @Peter77 found, I see similar stuff in various versions of Unity:

    Critical memory leak in 5.6.0 (p4) crashing Unity all the time
    https://forum.unity3d.com/threads/c...577.81012803.1497222362-1924063759.1497222362

    MEMORY LEAK WHEN SEARCHING IN THE HIERARCHY
    https://issuetracker.unity3d.com/is...933.81012803.1497222362-1924063759.1497222362


    Is there anyone else browsing this forum using 2017.1.0b9 that can confirm that my reproduction cause or don't cause the memory leak?

    My computer specs:
    Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz; NVIDIA GeForce GTX 980 Ti

    Maybe this is only on NVIDIA cards?
     
    Last edited: Jun 12, 2017
  5. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Have a pretty same issue but with light baking.
    And Hierarchy bug is reproduced too.

    Bug report: 920119_v5nujuus504041uv
     

    Attached Files:

    Last edited: Jun 12, 2017
  6. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    2017.1.0b9 as well, didn't notice this happening on 2017.1.0b8, as I use the hierarchy filter a lot and didn't experience any crashing.

    Intel(R) Core (TM) i7-6700k CPU @ 4.00GHz. nVidia GTX 1080. Windows 19
     
  7. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Unity QA updated to say they could partially reproduce it and the fix will be tracked as part of the bug @Peter77 mentioned: https://issuetracker.unity3d.com/is...view-port-camera-with-hierarchy-search-active

    I believe the reason they couldn't reproduce my problem with just pressing play is based on the Unity editor layout.

    I use a layout where both the game & scene view are always visible:


    But I believe by default a lot of people have the game & scene view share a position meaning only 1 is visible at a time. I tested this and confirmed that if the scene view is not visible, the memory leak does not happen. So the re-drawing of the scene view with a filter (which greys out filtered objects) is likely the culprit.

    For now I'm just going to use b8.
     
    DMeville likes this.