Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.25f1

Issue ID

UUM-35361

Regression

No

Editor freezes on SceneView.Paint Unity's code execution when entering Play Mode in a project that uses Vulkan Graphics API

--

-

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}}

  1. Resolution Note:

    The crash is caused by out of memory and there is no good way to fix it in older version. DirectX can mitigate this issue by swapping resources from GPU to system memory, but Vulkan does not have such capability. When GPU memory runs out, we start to allocate resources in system memory thus the "Suboptimal memory type used for image because of low memory" log. If the system memory also runs out, the engine will crash if the resource attempting to allocate is critical like in this case the swapchain staging image. The total available memory in the system is dependent on the environment as other running programs also compete for resources, so the crash can seem random.

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.