Skip to content
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

SDL_CreateRenderer hangs on Manjaro/Arch Linux for FULLSCREEN_DESKTOP window #3828

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 1 comment

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.12
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2020-09-21 12:02:34 +0000, wrote:

At least two users of my game, both running Manjaro Linux using NVidia graphics, report not being able to start the game in FULLSCREEN_DESKTOP mode: the screen flashes but does not show the game's window. "Top" or equivalent show the game is still running but is stuck on something.

Through trial and error we found that the code hangs on SDL_CreateRenderer() for a window with the flag SDL_WINDOW_FULLSCREEN_DESKTOP set. When they start in windowed mode, the window shows up and they can then move in and out of fullscreen without any problems. When they quit the game, the first time they start up in fullscreen mode it still works, but the second time it hangs again.

I wasn't able to reproduce this myself with a virtual machine.

Original bug: bvschaik/julius#510
Video of the behaviour: https://youtu.be/PSdNT67bcdk

Relevant code:

SDL_Log("Creating renderer, available drivers:");
SDL_RendererInfo info;
int num_drivers = SDL_GetNumRenderDrivers();
for (int i = 0; i < num_drivers; i++) {
    SDL_GetRenderDriverInfo(i, &info);
    SDL_Log("- %s", info.name);
}
SDL.renderer = SDL_CreateRenderer(SDL.window, -1, SDL_RENDERER_PRESENTVSYNC);
if (!SDL.renderer) {
    SDL_Log("Unable to create renderer, trying software renderer: %s", SDL_GetError());
    SDL.renderer = SDL_CreateRenderer(SDL.window, -1, SDL_RENDERER_SOFTWARE);
    if (!SDL.renderer) {
        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create renderer: %s", SDL_GetError());
        return 0;
    }
}
SDL_GetRendererInfo(SDL.renderer, &info);
SDL_Log("Created renderer: %s (%d)", info.name, info.flags);

The logging for starting in windowed mode shows:

INFO: Creating renderer, available drivers:
INFO: - opengl
INFO: - opengles2
INFO: - software
INFO: Created renderer: opengl (14)

The logging for starting in fullscreen mode stops after the list of drivers: neither "Created renderer" nor any of the error messages is printed.

I'm guessing this is an issue with a combination of Manjaro/Arch software update, display drivers, and SDL, since both users report the issue starting suddenly. It's frustrating that I cannot reproduce it. Since it hangs in an SDL call I report this bug here; if I should have reported it somewhere else, please let me know.

On 2020-09-29 19:15:09 +0000, Rohit Nirmal wrote:

I'm getting the issue in Chocolate Doom with fullscreen as well. I erroneously filed the bug there (chocolate-doom/chocolate-doom#1314), and the issues I mentioned are similar to the ones described here.

On 2020-12-29 09:03:41 +0000, wrote:

One user reported this issue is fixed in Manjaro 20.2. I assume it was a driver issue then.

@rohit-n
Copy link
Contributor

rohit-n commented Feb 11, 2021

Congrats on the Github migration.

I'm also not getting this issue any more after updating my Manjaro packages, so this can probably be closed.

@slouken slouken removed the bug label May 11, 2022
@slouken slouken closed this as completed Nov 7, 2023
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

3 participants