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

[hdrp] Memory Leak In 2019.2.0a9 (and 0a11)

Discussion in '2019.2 Beta' started by Vaspra, Apr 11, 2019.

  1. Vaspra

    Vaspra

    Joined:
    Apr 15, 2018
    Posts:
    34
    Since upgrading to 2019.2 alpha, I have had some errors occurring and a bunch of garbage collection warnings repeatedly.

    Errors:

    Recursive rendering is not supported in SRP (are you calling Camera.Render from within a render pipeline?).



    Assertion failed on expression: '!GetPersistentManager().IsStreamLoaded(metaDataPath)'



    Asset import did not unload metadata path. This will leak memory. File a bug with repro steps please. (Assets/Prefabs/Parts/Hands/Cannons/Gauss Cannon.prefab)



    GUI Window tried to begin rendering while something else had not finished rendering! Either you have a recursive OnGUI rendering, or the previous OnGUI did not clean up properly.



    Assertion failed on expression: 'device.IsInsideFrame()'


    Warnings (many, repeatedly, even with nothing in scene):


    GarbageCollector disposing of ComputeBuffer allocated in C:\Unity\Host 3D - 2019.2 alpha\Library\PackageCache\com.unity.render-pipelines.high-definition@6.6.1-preview\Runtime\Lighting\LightLoop\LightLoop.cs at line 846. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
    UnityEngine.ComputeBuffer:Finalize()



    GarbageCollector disposing of ComputeBuffer allocated in C:\Unity\Host 3D - 2019.2 alpha\Library\PackageCache\com.unity.render-pipelines.high-definition@6.6.1-preview\Runtime\RenderPipeline\HDRenderPipeline.cs at line 366. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
    UnityEngine.ComputeBuffer:Finalize()



    GarbageCollector disposing of ComputeBuffer allocated in C:\Unity\Host 3D - 2019.2 alpha\Library\PackageCache\com.unity.render-pipelines.high-definition@6.6.1-preview\Runtime\Lighting\VolumetricLighting\VolumetricLighting.cs at line 251. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
    UnityEngine.ComputeBuffer:Finalize()



    GarbageCollector disposing of ComputeBuffer allocated in C:\Unity\Host 3D - 2019.2 alpha\Library\PackageCache\com.unity.render-pipelines.high-definition@6.6.1-preview\Runtime\Lighting\Shadow\HDShadowManager.cs at line 219. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
    UnityEngine.ComputeBuffer:Finalize()


    I don't know if the erroneous metadatapath prefabs (often containing new VFX effects) are connected to the hdrp garbage collector issues.

    I'm sure I have missed out something useful for helping to get to the bottom of this so please suggest anything I can do to help debug this!

    My project is becoming unworkable at the moment, the play/stop functions take 10x longer than usual, and this gets progressively worse over each session.

    Thanks in advance!

    [Packages]
    Code (CSharp):
    1. {
    2.   "registry": "https://staging-packages.unity.com",
    3.   "dependencies": {
    4.     "com.unity.2d.sprite": "1.0.0",
    5.     "com.unity.2d.tilemap": "1.0.0",
    6.     "com.unity.ads": "2.3.1",
    7.     "com.unity.analytics": "3.3.2",
    8.     "com.unity.collab-proxy": "1.2.16",
    9.     "com.unity.package-manager-ui": "2.2.0",
    10.     "com.unity.probuilder": "4.0.4",
    11.     "com.unity.purchasing": "2.0.6",
    12.     "com.unity.render-pipelines.high-definition": "6.6.1-preview",
    13.     "com.unity.textmeshpro": "2.0.0",
    14.     "com.unity.timeline": "1.0.0",
    15.     "com.unity.visualeffectgraph": "6.6.1-preview",
    16.     "com.unity.xr.legacyinputhelpers": "2.0.2",
    17.     "com.unity.modules.ai": "1.0.0",
    18.     "com.unity.modules.androidjni": "1.0.0",
    19.     "com.unity.modules.animation": "1.0.0",
    20.     "com.unity.modules.assetbundle": "1.0.0",
    21.     "com.unity.modules.audio": "1.0.0",
    22.     "com.unity.modules.cloth": "1.0.0",
    23.     "com.unity.modules.director": "1.0.0",
    24.     "com.unity.modules.imageconversion": "1.0.0",
    25.     "com.unity.modules.imgui": "1.0.0",
    26.     "com.unity.modules.jsonserialize": "1.0.0",
    27.     "com.unity.modules.particlesystem": "1.0.0",
    28.     "com.unity.modules.physics": "1.0.0",
    29.     "com.unity.modules.physics2d": "1.0.0",
    30.     "com.unity.modules.screencapture": "1.0.0",
    31.     "com.unity.modules.terrain": "1.0.0",
    32.     "com.unity.modules.terrainphysics": "1.0.0",
    33.     "com.unity.modules.tilemap": "1.0.0",
    34.     "com.unity.modules.ui": "1.0.0",
    35.     "com.unity.modules.uielements": "1.0.0",
    36.     "com.unity.modules.umbra": "1.0.0",
    37.     "com.unity.modules.unityanalytics": "1.0.0",
    38.     "com.unity.modules.unitywebrequest": "1.0.0",
    39.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    40.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    41.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    42.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    43.     "com.unity.modules.vehicles": "1.0.0",
    44.     "com.unity.modules.video": "1.0.0",
    45.     "com.unity.modules.vr": "1.0.0",
    46.     "com.unity.modules.wind": "1.0.0",
    47.     "com.unity.modules.xr": "1.0.0"
    48.   }
    49. }
     
    Last edited: Apr 11, 2019
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi Vaspra,
    Could you please submit a bug report for this issue with a minimal reproduction project attached and reply in here with the issue ID?
     
  3. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    I have same errors. Some random prefabs (old and new) write errors like:

    Asset import did not unload metadata path. This will leak memory. File a bug with repro steps please. (Assets/_Project/Resources/Prefabs/Effects/Bonfire.prefab)

    Started with hdrp 6.6 and 2019.2.09, eat lot of memory in some scenes - 8 , 12 gb ram and then just crash.
     
  4. Vaspra

    Vaspra

    Joined:
    Apr 15, 2018
    Posts:
    34
    I'm sorry, I've been trying to whittle down the factors that cause this but it seems to occur sometimes, and sometimes not, with hugely variability. I can't create a simple project/scene that causes the error reliably.

    The only common thing I can find with the prefabs that exhibit this error is their VFX effects. Aside from this, they're just .fbx models with no texture, a simple "Metal" custom HDRP material, and some small behaviour Mono's.

    upload_2019-4-15_2-51-1.png