Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Crash: "Graphics.DrawProceduralIndirect with invalid buffer"

Discussion in 'General Graphics' started by thimler9, Apr 14, 2021.

  1. thimler9

    thimler9

    Joined:
    Sep 25, 2019
    Posts:
    4
    I'm working on a procedural terrain generation system that uses the Graphics.DrawProceduralIndirect function to draw it. The drawing looks perfectly fine, but very occasionally, only when it's built, do I get the error "Graphics.DrawProceduralIndirect with invalid buffer". After a bunch of these, the game usually crashes. I'm using URP as well.

    This is one of the crash logs:

    PlayerConnection initialized from C:/Users/Tom/Documents/URPVoxel Builds/Test/Voxel Terrain URP_Data (debug = 0)
    PlayerConnection initialized network socket : 0.0.0.0 55400
    Multi-casting "[IP] 10.0.0.52 [Port] 55400 [Flags] 2 [Guid] 2321555746 [EditorId] 2146956991 [Version] 1048832 [Id] WindowsPlayer(DESKTOP-U5L5AVC) [Debug] 0 [PackageName] WindowsPlayer [ProjectName] Voxel Terrain URP" to [225.0.0.222:54997]...
    Started listening to [0.0.0.0:55400]
    PlayerConnection already initialized - listening to [0.0.0.0:55400]
    Initialize engine version: 2020.2.1f1 (270dd8c3da1c)
    [Subsystems] Discovering subsystems at path C:/Users/Tom/Documents/URPVoxel Builds/Test/Voxel Terrain URP_Data/UnitySubsystems
    GfxDevice: creating device client; threaded=1
    Direct3D:
    Version: Direct3D 11.0 [level 11.1]
    Renderer: NVIDIA GeForce RTX 3070 (ID=0x2484)
    Vendor: (null)
    VRAM: 3072 MB
    Driver: 27.21.14.6192
    D3D11 device created for Microsoft Media Foundation video decoding.
    <RI> Initializing input.

    <RI> Input initialized.

    <RI> Initialized touch support.

    UnloadTime: 0.314000 ms
    Graphics.DrawProceduralIndirect with invalid buffer

    ...
    ... There's more than 50 of these
    ...

    Graphics.DrawProceduralIndirect with invalid buffer

    Graphics.DrawProceduralIndirect with invalid buffer

    Graphics.DrawProceduralIndirect with invalid buffer

    Graphics.DrawProceduralIndirect with invalid buffer

    Graphics.DrawProceduralIndirect with invalid buffer

    Graphics.DrawProceduralIndirect with invalid buffer

    Crash!!!
    SymInit: Symbol-SearchPath: '.;C:\Users\Tom\Documents\URPVoxel Builds\Test;C:\Users\Tom\Documents\URPVoxel Builds\Test;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 534, UserName: 'Tom'
    OS-Version: 10.0.0

    ========== OUTPUTTING STACK TRACE ==================

    0x79BFF986 (UnityPlayer) UnityMain
    0x79A2A62D (UnityPlayer) UnityMain
    0x79A2412C (UnityPlayer) UnityMain
    0x79C99BF6 (UnityPlayer) UnityMain
    0x79C9A46E (UnityPlayer) UnityMain
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 79892B9C)
    0x79892B9C (UnityPlayer) (function-name not available)
    0x79CA8466 (UnityPlayer) UnityMain
    0x79CA9684 (UnityPlayer) UnityMain
    0x79CADBA2 (UnityPlayer) UnityMain
    0x79F9A6BA (UnityPlayer) UnityMain
    0x7647FA29 (KERNEL32) BaseThreadInitThunk
    0x77597C7E (ntdll) RtlGetAppContainerNamedObjectPath
    0x77597C4E (ntdll) RtlGetAppContainerNamedObjectPath

    ========== END OF STACKTRACE ===========


    Does "invalid buffer" mean that the draw arguments buffer is invalid, the triangles buffer needed for the draw is invalid, or could it be both? Looking at the stack trace, it looks like I'm accessing some memory address that I don't have access to, but I'm stumped on what is causing that.

    I know this isn't a lot of information to go off of, but if I could get a better explanation of what the "invalid buffer" is that would be great.
     
unityunity