Skip to content

Conversation

bubbleguuum
Copy link
Contributor

Worker threads are created and never referenced.
They can be safely detached with SDL_DetachThread.

This fixes these warnings displayed upon exiting vkquake when run using sdl2-compat (SDL2 compatibility layer that uses SDL3 behind the scenes) used by some Linux distros:

INFO: Leaked thread (0x55ad3e03cc20)
(repeated for each thread)

Worker threads are created and never referenced.
They can be safely detached with SDL_DetachThread.

This fixes these warnings displayed upon exiting vkquake
when run using sdl2-compat (SDL2 compatibility layer that uses SDL3 behind the scenes)
used by some Linux distros:

INFO: Leaked thread (0x55ad3e03cc20)
(repeated for each thread)
@vsonnier
Copy link
Collaborator

vsonnier commented May 2, 2025

@bubbleguuum Thanks, looks like it works on my side (Win10 x64) as for Linux I'll have to trust you.

@bubbleguuum
Copy link
Contributor Author

bubbleguuum commented May 2, 2025

Confirming I tested on Linux, on openSUSE Tumbleweed using sdl2-compat meaning SDL3. SDL3 now displays "Leaked thread" warnings on SDL_Quit() for any non-detached thread that has not terminated.

@vsonnier vsonnier merged commit 1e229ca into Novum:master May 2, 2025
11 checks passed
@vsonnier
Copy link
Collaborator

vsonnier commented May 2, 2025

This is good to go then

j4reporting pushed a commit to j4reporting/vkQuake that referenced this pull request May 3, 2025
* Detach worker threads

Worker threads are created and never referenced.
They can be safely detached with SDL_DetachThread.

This fixes these warnings displayed upon exiting vkquake
when run using sdl2-compat (SDL2 compatibility layer that uses SDL3 behind the scenes)
used by some Linux distros:

INFO: Leaked thread (0x55ad3e03cc20)
(repeated for each thread)

* Fix spacing

* Do not store invalid SDL_Thread after detach
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.

2 participants