godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.79k stars 20.91k forks source link

Editor hangs/crash when previewing a `Camera3D` with scale approaching 0 #93375

Open ydeltastar opened 3 months ago

ydeltastar commented 3 months ago

Tested versions

v4.3.beta.custom_build [1ce6df7087113a61491567f3ac55561d5688e2a8]

System information

Godot v4.3.beta (5833f5978) - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

Issue description

The editor hangs when sliding a Camera3D scale close to zero and infinitely spawns these errors in the console when using vulkan:

ERROR: Unable to acquire framebuffer.
   at: (servers\rendering\rendering_device.cpp:3503)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: RenderingDeviceDriverVulkan::command_queue_execute_and_present (drivers\vulkan\rendering_device_driver_vulkan.cp)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: RenderingDeviceDriverVulkan::command_queue_execute_and_present (drivers\vulkan\rendering_device_driver_vulkan.cp)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: RenderingDeviceDriverVulkan::fence_wait (drivers\vulkan\rendering_device_driver_vulkan.cpp:2066)

It crashes if using the d3d12 driver.

Steps to reproduce

Minimal reproduction project (MRP)

N/A

Sluggernot commented 3 months ago

Recreation: I am seeing logspam of servers\rendering\rendering_light_culler.cpp:544 - Condition "!res" is true. Returning: false core\math\basis.cpp:47 - Condition "det == 0" is true. And not crashing Video Card: Radeon RX 6700 XT Weird. You're getting Vulkan errors. How are you "using the d3d12 driver?"

ydeltastar commented 3 months ago

Weird. You're getting Vulkan errors. How are you "using the d3d12 driver?"

I tested in both. It spams errors and hangs when using Vulkan and crashes when using d3d12.

The Vulkan errors and d3d12 crash happen when I slide the scale down in the editor until it shows 0.005. The Condition "det == 0" is true happens in Vulkan when I directly set the scale to 0 and also crashes in d3d12.

jsjtxietian commented 3 months ago

det is zero here:

image