Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Recurring Exception in HDRP 12.1.8 - InvalidOperationException Trying to use a compute buffer ...

Discussion in 'High Definition Render Pipeline' started by martinofigueroa, Jan 23, 2023.

  1. martinofigueroa

    martinofigueroa

    Joined:
    Feb 8, 2017
    Posts:
    11
    Hello,

    We are getting the following recurring exception in Unity 2021.3.16, using HDRP 12.1.8.
    This happens at random, once in a while (maybe after 30-60 minutes of running our game).
    This happens on various machines with Windows 10/11 and different GPUs.

    Exception:

    InvalidOperationException: Trying to use a compute buffer ({bufferResource.GetName()}) that was already released or not yet created. Make sure you declare it for reading in your pass or you don't read it before it's been written to at least once.

    Callstack:

    UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphResourceRegistry.GetComputeBuffer (UnityEngine.Experimental.Rendering.RenderGraphModule.ComputeBufferHandle& handle) (at Library/PackageCache/com.unity.render-pipelines.core@12.1.8/Runtime/RenderGraph/RenderGraphResourceRegistry.cs:144)

    UnityEngine.Experimental.Rendering.RenderGraphModule.ComputeBufferHandle.op_Implicit (UnityEngine.Experimental.Rendering.RenderGraphModule.ComputeBufferHandle buffer) (at Library/PackageCache/com.unity.render-pipelines.core@12.1.8/Runtime/RenderGraph/RenderGraphResourceComputeBuffer.cs:29)

    UnityEngine.Rendering.HighDefinition.HDRenderPipeline.BindGlobalLightListBuffers (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+ForwardPassData data, UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext ctx) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.8/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs:682)

    UnityEngine.Rendering.HighDefinition.HDRenderPipeline+<>c.<RenderForwardOpaque>b__1037_0 (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+ForwardOpaquePassData data, UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext context) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.8/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs:799)

    UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphPass`1[PassData].Execute (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext renderGraphContext) (at Library/PackageCache/com.unity.render-pipelines.core@12.1.8/Runtime/RenderGraph/RenderGraphPass.cs:151)

    UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph.ExecuteCompiledPass (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph+CompiledPassInfo& passInfo, System.Int32 passIndex) (at Library/PackageCache/com.unity.render-pipelines.core@12.1.8/Runtime/RenderGraph/RenderGraph.cs:1343)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  2. tomwilliamson

    tomwilliamson

    Joined:
    Mar 24, 2016
    Posts:
    8
    Hello,

    We are on Unity 2021.3.21 and HDRP 12.1.10, and are still seeing this exception popping up from time to time. What could be causing this?

    Many thanks,
    Tom
     
  3. tomwilliamson

    tomwilliamson

    Joined:
    Mar 24, 2016
    Posts:
    8
    We're now on Unity 2022.3.1f1. The exception still happens roughly every 10-40 minutes, on all platforms.

    We determined that the buffer in question is called "BigTiles", which looks to be related to volumetric lighting.

    We have disabled volumetrics, which we weren't using anyway, but this hasn't made any difference to the exception.

    We have tried progressively removing lights and disabling rendering of GameObjects in an attempt to narrow down what might be causing the issue. But even with little more than a blank screen being drawn, we still see the exception after leaving the game running for a while.

    We are catching the exception and ignoring it, and the game continues with no apparent adverse effects. But the thought of having unexplained exceptions firing regularly makes me nervous.

    Is anyone else experiencing this error?

    Many thanks,
    Tom
     
    brookcliff likes this.
  4. kmowers

    kmowers

    Joined:
    Dec 12, 2016
    Posts:
    15
    I am also experiencing this periodic exception. It cause a slight flicker in editor and in game. Im using 2022.3.0f1, HDRP 14.0.7