-
Notifications
You must be signed in to change notification settings - Fork 328
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
main-sdl2.c "graphics.texture != NULL" crash, or black screen, changing tile settings on menu screens #5552
Comments
In the Windows front-end, the graphics menu is locked while in a menu, so it is not possible to follow the steps there to reproduce the issue. (Curiously, only the 16x16 tile size multiplier menu option is left not-grayed-out, and selecting it pops up a message saying you aren't allowed to do that right now.) |
I was able to reproduce the crash on Linux with the SDL2 front end if I had a subwindow open displaying the player (compact) data and that subwindow was displaying tiles for the equipment slots. Did you have that subwindow open for the crashes you saw (it looks like you do from the screenshots)? With that subwindow closed, do you see any crashes when you turn off tiles, either with or without a menu open in the main window? From what I'm seeing, this is related to #5551 . Because the player (compact) window isn't properly updated for changes to the tile set used, it can still have locations that say "use tile x". With the change to no tiles, the SDL2 client no longer has the tiles loaded into a texture so drawing that location triggers the assertion failure. |
I had had that thought as well but yes, I still get the crash (only with a menu screen open) even with the player compact subwindow off. The behavior may change slightly though: with the player compact subwindow and the monster list off, I usually had to click in the blanked main window, then hit ESC, before the crash would occur after turning tiles off; it didn't occur immediately as it usually had when I'd had all subwindows visible (whether or not the tiles were visible in them at the time). |
…when using tiles and the tile multipliers are different than 1 x 1. Avoids displaying truncated tiles in that situation. Found while researching angband#5552 .
…entry act like the other multiplier entries (pointed out in angband#5552 ) ; disable all the tile multiplier entries when not using tiles
…(for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves angband#5552
#5555 fixes this by having the SDL2 front end act like the Windows front end: only allow changing the tile set used when at a command prompt in game. There isn't the infrastructure internally to make dismissing an in-game menu robust to changes of the tile set used while the menu was open. |
The blank screens in response to changing the tile multipliers aren't affected by #5555 . Could try to get the menus to redraw themselves in those situations or, like the handling of changing the tile set, disable the ability to change the multipliers when not at a command prompt (the latter is likely cleaner; because redrawing the menu itself doesn't help with the display artifacts that can be there when the last menu is dismissed and return to the command prompt). |
Yeah, if you're locking the one, you might as well lock the other as well. It'll be consistent with the Windows front end, too. |
…ame menu (for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves angband#5552 ; for Mac, change the interface that sets the multipliers: no separate dialog and use a menu which sets the desired size (relative to the native size) for the tiles; the recompiled Mac interface file was generated with Xcode 14.1
…when using tiles and the tile multipliers are different than 1 x 1. Avoids displaying truncated tiles in that situation. Found while researching #5552 .
…entry act like the other multiplier entries (pointed out in #5552 ) ; disable all the tile multiplier entries when not using tiles
…#5555) * SDL, SDL2, Mac: disable changing the tile set when in a in-game menu (for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves #5552 * SDL, SDL2, Mac: disable changing the tile multipliers when in an in-game menu (for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves #5552 ; for Mac, change the interface that sets the multipliers: no separate dialog and use a menu which sets the desired size (relative to the native size) for the tiles; the recompiled Mac interface file was generated with Xcode 14.1
…when using tiles and the tile multipliers are different than 1 x 1. Avoids displaying truncated tiles in that situation. Found while researching angband/angband#5552 .
…entry act like the other multiplier entries (pointed out in angband/angband#5552 ) ; disable all the tile multiplier entries when not using tiles
… (#5555) * SDL, SDL2, Mac: disable changing the tile set when in a in-game menu (for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves angband/angband#5552 * SDL, SDL2, Mac: disable changing the tile multipliers when in an in-game menu (for SDL and SDL2 also disable those changes until the character is fully in game; Mac does allow changes while on the splash screen); resolves angband/angband#5552 ; for Mac, change the interface that sets the multipliers: no separate dialog and use a menu which sets the desired size (relative to the native size) for the tiles; the recompiled Mac interface file was generated with Xcode 14.1
Tested in MSYS2-compiled SDL2 front-end, latest code, somewhat dirty, under Windows 11.
Turning tiles off while on a menu screen in the SDL2 front end compiled under MSYS2 frequently crashes the game. If no crash occurs, the text goes blank, leaving a plain black main window with only the yellow cursor showing. Toggling tiles on in the menus, or changing their size, similarly blanks the text, but does not produce a crash.
Two that have produced the crash consistently:
== The game crashes with a Windows error window (see screenshot below)
The behavior when toggling tiles off on other menu screens sometimes been inconsistent. For a while, about half were just blanking the screen, rather than crashing. The "?" help screen usually produced a crash, but once I just got a blank screen, then when I backed out, the void around the town was filled with a loose grid of tiles (didn't screenshot that and now I can't reproduce it--just crashes--drat). Currently, all menus, even a partial menu like the "e" equipment screen, are leading to the crash when toggling the tiles off.
Example of blanking the screen:
or
== The main window text goes black.
The text was updated successfully, but these errors were encountered: