Reproduction steps:
1. Open the attached “repro-project“
2. Open Assets/Main Scene.unity scene
3. Enter Play Mode
Expected result: Play Mode is entered successfully
Actual result: The Editor freezes on SceneView.Paint Unity’s code execution
Reproducible with: 2021.3.25f1
Not reproducible with: 2022.2.0b3, 2022.2.19f1, 2023.1.0b16, 2023.1.0a14
Could not test with: 2020.3.48f1 (could not downgrade the project), 2022.2.0a1, 2022.2.0b2 (due to errors in the Console)
Reproduced on: Windows 10 Pro
Notes:
1. Not reproducible with DirectX Graphics API
2. Memory errors (“Vulkan - Out of memory when trying to allocate swapchain staging image”, “Vulkan - Suboptimal memory type used for image because of low memory“, etc) are spammed in the Editor.log file
3. The Editor sometimes crashes with the following stack trace:
{{0x00007FFE82F66FED (vulkan-1) vkDestroyDescriptorPool }}
{{0x00007FF745C7ADA6 (Unity) vk::SwapChain::SetupSwapChainImages }}
{{0x00007FF745C6BAC1 (Unity) vk::SwapChain::Create }}
{{0x00007FF745C7BDED (Unity) vk::SwapChain::UpdateConfiguration }}
0x00007FF745CAA073 (Unity) GfxDeviceVK::UpdatePrimarySwapChain