Search Issue Tracker

Fixed in 2022.1.X

Votes

0

Found in

2019.4

2020.3

2021.1

2021.1.13f1

2021.2

2022.1

Issue ID

1356448

Regression

No

Crash when using Graphics.DrawProceduralIndirectNow()

Graphics Device Features

-

How to reproduce:
1. Open the attached project "FPP.zip"
2. Open "MeshScene" Scene
3. Enter Play Mode

Expected result: Editor doesn't crash
Actual result: Editor crashes

Reproducible with: 2019.4.29f1, 2020.3.16f1, 2021.1.17f1, 2021.2.0b7, 2022.1.0a5

Notes:
- Editor no longer crashes after removing line 82 on RunComputeShader.cs

First 17 lines of the stack trace:
GraphicsScripting::DrawProceduralIndirectNow(GfxPrimitiveType, ComputeBuffer*, int)
Graphics_CUSTOM_Internal_DrawProceduralIndirectNow(GfxPrimitiveType, ScriptingBackendNativeObjectPtrOpaque*, int)
(wrapper managed-to-native) UnityEngine.Graphics:Internal_DrawProceduralIndirectNow (UnityEngine.MeshTopology,UnityEngine.ComputeBuffer,int) {0x7f87dd2d88d0} + 0x6b (0x1b3afec60 0x1b3afed4d) [0x17a188960 - Unity Child Domain]
mono_jit_runtime_invoke
do_runtime_invoke
mono_runtime_invoke
scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
MonoBehaviour::CallMethodIfAvailable(int)
RenderManager::InvokeOnRenderObjectCallbacks()
Camera::DoRenderPostLayers(CullResults const*, ShaderPassContext&, Camera::RenderFlag, void (*)())
Camera::RenderEditorCamera(Camera::EditorDrawingMode, DrawGridParameters const*, CullResults*, Camera::RenderFlag, int, bool)
Camera::RenderEditorCamera(Camera::EditorDrawingMode, DrawGridParameters const*, bool)
Handles_CUSTOM_Internal_DrawCameraWithGrid(ScriptingBackendNativeObjectPtrOpaque*, Camera::EditorDrawingMode, DrawGridParameters&, unsigned char)
(wrapper managed-to-native) UnityEditor.Handles:Internal_DrawCameraWithGrid (UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters&,bool) {0x7f87dd7c1bb8} + 0x6f (0x1b3afe930 0x1b3afea25) [0x17a188960 - Unity Child Domain]
UnityEditor.Handles:DrawCameraStep1 (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters,bool) {0x7f87da376800} + 0x7b (0x1b3ae5080 0x1b3ae50fd) [0x17a188960 - Unity Child Domain]
UnityEditor.SceneView:DoDrawCamera (UnityEngine.Rect,UnityEngine.Rect,bool&) {0x7f8898311e98} + 0x8cb (0x1b3ae28c0 0x1b3ae3204) [0x17a188960 - Unity Child Domain]

  1. Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0a12
    Using buffers after disposing them won't crash in DrawProcedural* functions anymore. Instead an error is displayed in the console.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.