Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.1
2022.1
Issue ID
1374982
Regression
No
Win Vulkan crashes when exiting play with a scene which is using UAV
Steps:
1. Open attached project (VulkanCrash.zip)
2. Open UAVInShader scene
3. Hit play
4. Exit play
5. Crash
========== OUTPUTTING STACK TRACE ==================
0x00007FF7F9CF9D82 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\vulkan\VKDescriptorState.cpp:149] vk::DescriptorState::BindRandomWriteBuffer
0x00007FF7F9D0FCE3 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\vulkan\DeviceStateVK.cpp:819] vk::DeviceState::BindUAVs
0x00007FF7F9CDEBBC (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\vulkan\GfxDeviceVK.cpp:983] GfxDeviceVKBase::DrawBuffersInternal
0x00007FF7F9CDD2B1 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\vulkan\GfxDeviceVK.cpp:2906] GfxDeviceVKBase::DrawBufferRangesPlatform
0x00007FF7F8CB0C4D (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\extensions\StereoSupportExt.cpp:539] SinglePassStereoSupportExt::DrawBuffersStereo
0x00007FF7F9CDD336 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\vulkan\GfxDeviceVK.cpp:949] GfxDeviceVKBase::DrawBuffers
0x00007FF7FC38F342 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\threaded\GfxDeviceWorker.cpp:2078] GfxDeviceWorker::RunCommand
0x00007FF7FC3933AE (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\threaded\GfxDeviceWorker.cpp:386] GfxDeviceWorker::RunExt
0x00007FF7FC393808 (Unity) [C:\buildslave\unity\build\Runtime\GfxDevice\threaded\GfxDeviceWorker.cpp:349] GfxDeviceWorker::RunGfxDeviceWorker
0x00007FF7F9709F67 (Unity) [C:\buildslave\unity\build\Runtime\Threads\Thread.cpp:82] Thread::RunThreadWrapper
0x00007FFCE20D7034 (KERNEL32) BaseThreadInitThunk
0x00007FFCE40C2651 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
Reproducible:
2022.1.0a11.1413 (ae01f5fb527d)
2022.1.0a2.310 (30d6875d3ce8)
2021.1.21f1.3059 (f2d5d3c59f8c)
2020.3.18f1.979 (a7d1c678663c)
2019.4.30f1 (5084f95a4472)
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
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
Resolution Note:
https://docs.unity3d.com/ScriptReference/Graphics.SetRandomWriteTarget.html
"The targets stay set until you manually clear them with ClearRandomWriteTargets. It is best practice to call ClearRandomWriteTargets after your rendering is complete. If you do not do this, rendering issues can occur and some built-in Unity rendering passes may crash."
You should add Graphics.ClearRandomWriteTargets() to OnDisabled()