Skip to content

rendervulkan: join present wait thread on shutdown - #2494

Merged
matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
connormclaud:fix-present-wait-shutdown
Oct 20, 2026
Merged

matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
connormclaud:fix-present-wait-shutdown

Conversation

@connormclaud

Copy link
Copy Markdown

When using --backend sdl, present_wait_thread_func was detached and could
race with backend destruction during exit, crashing in CalcNextWakeupTime
when dereferencing a null s_pBackend.

Manage the thread with a std::jthread and shut it down cleanly before
destroying the backend in steamcompmgr_exit and CSDLBackend.

Fixes #2402

@connormclaud
connormclaud marked this pull request as ready for review October 16, 2026 20:27
Comment thread src/Backends/SDLBackend.cpp Outdated
When using --backend sdl, present_wait_thread_func was detached and could
race with backend destruction during exit, crashing in CalcNextWakeupTime
when dereferencing a null s_pBackend.

Manage the thread with a std::jthread and shut it down cleanly before
destroying the backend in steamcompmgr_exit.

Fixes ValveSoftware#2402
@connormclaud
connormclaud force-pushed the fix-present-wait-shutdown branch from 51812b0 to 61b0f59 Compare October 20, 2026 18:50
@matte-schwartz
matte-schwartz merged commit aa289ea into ValveSoftware:master Oct 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gamescope 3.16.25 crashed with a SIGSEGV inside gamescope::CVBlankTimer::CalcNextWakeupTime(bool).

3 participants