Skip to content

quakespasm (sdl2 version) broken #486

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

Closed
sezero opened this issue May 10, 2025 · 10 comments
Closed

quakespasm (sdl2 version) broken #486

sezero opened this issue May 10, 2025 · 10 comments
Milestone

Comments

@sezero
Copy link
Contributor

sezero commented May 10, 2025

See screen shot below: The in-game screenshot facility (glReadPixels) works, so, SwapBuffers isn't working??

This is on i686-linux, gnome2, pure x11, with 2.32.56 release + SDL3 from current git HEAD.

Can anyone reproduce?

Image

@andreymal
Copy link

In my case, downgrading sdl2-compat to 2.32.54 does not fix quakespasm, but downgrading sdl3 to 3.2.10 fixes it

@sezero
Copy link
Contributor Author

sezero commented May 10, 2025

You seem correct: I locally reverted ae77bfa so that it accepts 3.2.10, running against 3.2.10 is good, 3.2.12 as well as git main are bad.

@Kontrabant
Copy link
Contributor

The only thing I can think of is line 539 in src/video/x11/SDL_x11window.c

const bool use_resize_sync = !!(window->flags & SDL_WINDOW_OPENGL); // Doesn't work well with Vulkan

Try commenting out the flag test and force it to false. This is the only vaguely x11 related GL change I can think of in recent memory.

Possibly related to #482 as well?

@sezero
Copy link
Contributor Author

sezero commented May 11, 2025

The only thing I can think of is line 539 in src/video/x11/SDL_x11window.c

const bool use_resize_sync = !!(window->flags & SDL_WINDOW_OPENGL); // Doesn't work well with Vulkan

Try commenting out the flag test and force it to false. This is the only vaguely x11 related GL change I can think of in recent memory.

Changing that line to const bool use_resize_sync = false; did not help. (main branch)

@andreymal
Copy link

Bisected to libsdl-org/SDL@3b91017 — this commit is broken, its parent is working

(I have no idea how can this be related to PulseAudio 🤯)

But yes, commenting out the SDL_CleanupTLS(); line in src/audio/pulseaudio/SDL_pulseaudio.c does fix quakespasm (main branch)

@andreymal
Copy link

andreymal commented May 11, 2025

By the way, this also fixes Xonotic's black screen

@sezero
Copy link
Contributor Author

sezero commented May 11, 2025

Bisected to libsdl-org/SDL@3b91017 — this commit is broken, its parent is working

But yes, commenting out the SDL_CleanupTLS(); line in src/audio/pulseaudio/SDL_pulseaudio.c does fix quakespasm (main branch)

By the way, this also fixes Xonotic's black screen

CC @icculus

@sezero
Copy link
Contributor Author

sezero commented May 11, 2025

Running with SDL_AUDIODRIVER=alsa set does make it display the game properly.

But, I see a lot of the following on my terminal. (This is with alsa-lib-1.1.0,
btw...)

ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL sysdefault:0
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 1
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL sysdefault:1
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL sysdefault:0
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 1
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL sysdefault:1

@icculus
Copy link
Collaborator

icculus commented May 11, 2025

Yeah, we're just going to revert that commit. A more-careful version that doesn't fire on a real thread would be better, but the leak wasn't serious enough for the chaos it causes.

slouken pushed a commit to libsdl-org/SDL that referenced this issue May 11, 2025
…oop callback."

This reverts commit 3b91017.

This apparently is cleaning up more threads than expected, so this needs a
rethink.

Fixes #12986.
Fixes libsdl-org/sdl2-compat#486
Fixes libsdl-org/sdl2-compat#482

(cherry picked from commit e1066ce)
@slouken slouken added this to the SDL 3.2.14 milestone May 11, 2025
@slouken
Copy link
Collaborator

slouken commented May 14, 2025

SDL 3.2.14 with the fix for the bug is now available!

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

No branches or pull requests

5 participants