X Tutup
Skip to content

Do not begin a new frame during RenderingDevice's shutdown.#111733

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
DarioSamo:rendering-device-shutdown-fix
Oct 16, 2025
Merged

Do not begin a new frame during RenderingDevice's shutdown.#111733
Repiteo merged 1 commit intogodotengine:masterfrom
DarioSamo:rendering-device-shutdown-fix

Conversation

@DarioSamo
Copy link
Contributor

Some APIs do not support destroying a command buffer that was begun but never finalized. The solution here is to just not start a new frame during RenderingDevice's shutdown.

@DarioSamo DarioSamo requested a review from a team as a code owner October 16, 2025 16:55
@clayjohn clayjohn added this to the 4.6 milestone Oct 16, 2025
@clayjohn
Copy link
Member

I suspect this is causing some of our sporadic device lost errors. It's obviously extremely difficult to reproduce. But the current behaviour is invalid, so this should be fixed

@Repiteo Repiteo merged commit 026efbb into godotengine:master Oct 16, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 16, 2025

Thanks!

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on macOS 26 (Metal and Vulkan), it works as expected (including lightmap baking). Note that I couldn't reproduce device lost issues on my end previously though.

Code looks good to me.

@bruvzg
Copy link
Member

bruvzg commented Oct 23, 2025

Was this introduced to fix a specific issue? Looks like this change cause crashes on multiple platforms - #111879 #111904 #111949.

@clayjohn
Copy link
Member

Was this introduced to fix a specific issue? Looks like this change cause crashes on multiple platforms - #111879 #111904 #111949.

Ya, it fixes a crash on shutdown. The old behaviour was undefined and caused random issues. It was pretty rare to reproduce though, so we could consider reverting this temporarily while we find a proper fix if I can't find a proper fix soon

@AThousandShips

This comment was marked as resolved.

@bruvzg

This comment was marked as resolved.

@AThousandShips

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup