-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many lights on screen renders editor and runtime unresponsive until restart [4.3 dev] #89312
Comments
I can confirm the project fails with a Vulkan validation error.
It'll likely require more investigation to find out the real cause, but as I suspected the error you're seeing is just the driver failing to work once a series of errors happens before. |
The crash seems to mostly originate from the fact that it tries to render the shadowmaps for the omni lights outside of the size of the atlas texture. I'm not very familiar with how Forward+ handles this yet, but I can confirm at least it's not a regression from how RenderingDevice handles this: draw lists with regions out of bounds are being issued and the renderer is considering it an error. It does seem like the issue correlates at least to a lot of omni lights with shadowmaps being rendered (not exactly recommended but a use case nonetheless). Maybe @clayjohn has a better idea of why the render list for the shadow pass could be assigning a region outside of the bounds of the atlas texture?
Perhaps the differentiating factor was whether those lights were enabled for shadow casting or not? |
This may be right, I think I forgot to enable shadow casting when I tested. |
Another interesting data point is that this doesn't crash on my intel iGPU! I'll look into it deeper with a dedicated GPU Not reproducible in dev1, reproducible in dev2. Therefore it's most likely an ARG regression |
I hit this bug on 4.3dev6, on linux. Regular build, not the mono one. My system is an up to date arch linux setup. |
There are two parts to this bug:
I have tracked the validation problem down to this line (try and spot the bug):
I will fix this and the shadow atlas issue in the same PR, hopefully soon The shadow issue is specifically coming from SpotLights when the shadow atlas is full |
Tested versions
System information
Godot v4.3.dev4.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 (NVIDIA; 31.0.15.5176) - Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 Threads)
Issue description
Having many lights on screen causes the editor to freeze up and effectively become permanently stuck, requiring it to be closed. I'm not sure of the exact cause for this, as I tried making a different setup with many more omni lights (only omni lights) but it did not cause the crash. The MRP has a single directional light, with a mix of many omni and spot light nodes with a variety of different properties and transforms.
Edit: The (presumably) exact same issue occurs at runtime too, tested with a simple WASD mouselook camera.
Running the editor with the console shows this error being spammed continuously upon production of the bug:
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2214) ERROR: Unable to acquire framebuffer. at: (servers/rendering/rendering_device.cpp:3199)
This happens in the forward+ and mobile renders, but not the compatibility renderer.
This issue does not happen in latest stable build (4.2.1)
Steps to reproduce
Steps to reproduce is outlined in the MRP provided.
Minimal reproduction project (MRP)
https://github.com/MarioBossReal/Light-Crash-Issue-MRP
The text was updated successfully, but these errors were encountered: