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

Bug Unity takes up 2GB more memory...

Discussion in '2021.1 Beta' started by laurentlavigne, Mar 2, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    upload_2021-3-2_14-7-14.png

    At idle, same project. Looks like a bug, mem leak maybe, I didn't investigate. logged as 1318741
     
  2. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Is this the same project opened with the same Unity version or different version? Was one Unity instance been running longer than the others?
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Same project running in different versions, the one that eats up 4.5GB is 2021 and the other one is 2020.1, both started around the same time
     
  4. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Interesting I get that same memory footprint on startup in 2020.2 that just started sometime this last week. Judging by editor logs what is going on is unity is loading a bunch of assets into memory that it shouldn't be. It actually climbs to around 20gb on my project during startup and then where it explicitly unloads unused towards the end it drops back down to 4-5gb range. It shows unloading 78k assets in my editor log, which seems way beyond reasonable.

    And the 4gb never goes down. Let it sit all night was still there. So it has to be a bug and the memory never being free'd is probably just a side effect memory leak.

    Did you by chance upgrade VS to 16.9? I had some reason to believe that might be at play here. Timing and the editor logs consistently show Roslyin terminated messages. Along with messages about shader import version being wrong and it's compiling shaders every load which I don't think it used to do.
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I feel the same way as @snacktime , after VS16.9 something is not quiet right. Also, VS 16.9 seems to have some issue of having multiple window tab across different display monitor and then opening another script through Unity causes everything else to close down except the script just opened, which is major pain to work with.
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Also get this with latest Rider, so its not just VS related
     
    NotaNaN likes this.
  7. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    Please file a bug for the multiple window issue using the Help > Submit Feedback > Report a problem. Thank you!
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    I use Rider so I think @MadeFromPolygons is right, this is not VS related and only happens in 2021.x
    @John_MSFT this whole thing reminds of Softimage XSI, were you around MS back in 2000?
     
  9. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    By VS most of us mean everything it comes with not just the IDE. In this case in particular build/compiler tools that Unity uses would I think be most suspect. And what IDE is involved probably not important.
     
  10. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    In this case, Unity uses it's own shipped Roslyn so we think it's not related to VS or any IDE right now. In the meantime, we've talked with some folks at Unity about this and it's being investigated. Filing a bug with Unity is the right step here for now. Thank you!
     
    NotaNaN likes this.
  11. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    No. :)