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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

AsyncGPUReadBack Request Memory Issue

Discussion in '2020.1 Beta' started by Soaryn, Apr 19, 2020.

  1. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    LooperVFX and richardkettlewell like this.
  2. witson

    witson

    Joined:
    Feb 17, 2015
    Posts:
    10
    A similar problem, most likely caused by the same. When using the unity recorder package in movie mode, even in an empty project. All RAM and swap file loaded up to 80+ gb. Video recording was cut off each time at 4000-5000 frames with a critical error of the editor.

    Tested in versions unity 2020.1b2, b5, and late alphas. Recorder versions is 2.1.0 and 2.2.0

    Legacy mp4 recorder work fine, but too slow.
     
    Last edited: Apr 20, 2020
  3. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    As a workaround: RequestToNativeArray doesn't have this issue and potentially saves one copy when ping ponging two buffers.
     
  4. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    With a fix that has been readied for a10 for a while, I was curious as to what were the limitations of porting it back to 2020.1 versions were?
    I also find it interesting a fix was found roughly around the time 2020.2a7 came out, but was slated for a10? Any reason for this? :)
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    The fix is heading to 2020.1 as well
     
  6. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    There is something very similar happening in 2019.3.12. I have memory leak once the editor loads and memory wont get released. I sent 2 projects and i got no answer or if there is any investigation. Since i'm working in big open world, i'm able to be in the scene like 6 minutes, then everything crashes and i can start all over again... It never encountered anything like that before the port to HDRP... :(
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    QA sent you a reply today.
     
  8. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Hi!
    I'm facing the same exact issue when using Unity 2019.4.0f1 or 2019.4.1f1.
    Using RequestToNativeArray as julian suggested is an effective workaround, though.
     
  9. Komikom

    Komikom

    Joined:
    May 20, 2015
    Posts:
    38
    Can confirm...

    2020.1.0f1 - Still huge memory leaks (~300MB/s in my case)
    2020.1.9f1 - Fixed, no leaks
     
    LooperVFX likes this.
  10. triangle4studios

    triangle4studios

    Joined:
    Jun 28, 2020
    Posts:
    33
    This is happening in 2019.4.38.
    Telling someone to upgrade to the latest version of unity to fix it defeats the purpose of LTS.
    This is a highly important issue as compute shaders do not release RWStructuredBuffer's from memory.
     
    Menion-Leah likes this.
  11. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    I'm not sure what you're referring to exactly regarding being told to upgrade to latest Unity - I can't see a message about that.

    But I suppose I'm about to say a version of it... so maybe you are preempting me! 2019.4 is no longer supported - our current commitment to LTS is to support each one for 2 years. There will not be any more patches to 2019.4. So at this point you would need to upgrade to at least 2020.3 to get this fix.

    To perhaps preempt you - this isn't the place to discuss how long we support each LTS - you could probably spin up a thread in the General Discussion forum if you wanted to talk about that further.
     
  12. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    I totally understand your point and generally agree with it - but in this specific case the bug is almost 3 years old, and should have been addressed for 2019 as well, since it was early 2020.
    Ignoring it for 3 years and then mark it as "now unsupported" is not the approach we'd like to see for future issues.
     
    richardkettlewell likes this.