Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
Votes
1
Found in
2019.3.9f1
2022.1.23f1
2022.2.0b16
2023.1.0a18
2023.2.0a1
Issue ID
UUM-10113
Regression
No
Editor crashes when Ray Tracing Shaders are not compiled properly
Reproduction steps:
- Open the attached project (“Crash_Shaders.zip“)
- Open Assets/Scenes/DxrSampleScene2
- Enter Play Mode
Expected result: Scene is being played
Actual result: Editor crashes
Reproducible with: 2019.4.40f1, 2020.3.36f1, 2021.3.6f1, 2022.1.10f1
Couldn't test with: 2022.2.0b1 (Unable to dispatch Ray Tracing Shader "RayTracingShader". Unsupported shader type for "ClosestHitMain". This shader type is supported in .shader files only.), 2023.1.0a2(Unable to dispatch Ray Tracing Shader "RayTracingShader". Unsupported shader type for "ClosestHitMain". This shader type is supported in .shader files only.)
First lines of stacktrace:
0x00007FF698C4BAE5 (Unity) GfxDeviceD3D12Base::DrawBuffersCommon
0x00007FF698C4AE6E (Unity) GfxDeviceD3D12Base::DrawBufferRanges
0x00007FF698C4B0F0 (Unity) GfxDeviceD3D12Base::DrawBuffers
0x00007FF69A255752 (Unity) GfxDeviceWorker::RunCommand
Reproducible on: Windows 11
[^Crash_Shaders.zip]
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
This is an user error and cannot by fixed by Unity.
It looks like the crash is caused by mismatching #pragma max_recursion_depth 8 declaration while static const uint gMaxDepth = 10; is used in the logic to stop the recursion which is higher than max_recursion_depth declaration. This cases cannot be detected by Unity or the shader compiler because is not possible to figure out from shader logic if you exceed the maximum recursion depth. This is 100% GPU crash.
Please set max_recursion_depth to 10 or gMaxDepth to 8.
Resolution Note (2023.2.X):
This is an user error and cannot by fixed by Unity.
It looks like the crash is caused by mismatching #pragma max_recursion_depth 8 declaration while static const uint gMaxDepth = 10; is used in the logic to stop the recursion which is higher than max_recursion_depth declaration. This cases cannot be detected by Unity or the shader compiler because is not possible to figure out from shader logic if you exceed the maximum recursion depth. This is 100% GPU crash.
Please set max_recursion_depth to 10 or gMaxDepth to 8.