-
Notifications
You must be signed in to change notification settings - Fork 114
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
Runtime crash: Crash when raising resolution above desktop resolution. #671
Comments
I cannot reproduce this here. While set to run in windowed mode, I successfully set my game to a window dimension that is much larger than my available screen space, and it resized itself as requested. Even getting that far required that I choose I also tried instructing the game to use non-windowed mode. It properly failed to pick the oversized resolution, and dropped back to a safe 640x480. Note that an X error of BadValue is an X library issue, not a Rebirth issue. Rebirth might be able to detect that you have requested something impossible and prevent it, but the value of |
For these dxx-rebirth resolution changes I was doing them in full screen mode. set desktop dxx-rebirth's and desktop resolution to a lower resolution than the display/system is capable of, exit and restart dxx-rebirth, then in full screen mode, change the dxx-rebirth resolution to a higher resolution than these that the system/display is capable of.
I'm not changing the full screen resolution to anything the system/display can't handle. I've had and can do desktops and 3d games at these resolutions before on this setup without any issues. Would the bug be it thinking the the maximum full screen a game could go should be limited to whatever the desktop is set to, even if the system/display could handle more?
Ok, If so, where should the issue be forwarded to? url? |
Confirmed.
More debugging will be required. Given SDL's automatic and forced grab when in full screen mode, this will be somewhat tedious, so it may need to wait a few days. That grab is one of the reasons that I prefer and recommend people use a full desktop dimension window, rather than run in full screen mode. In SDL1, full screen always grabs. A desktop-sized window can choose whether to grab, and can automatically drop the grab when a menu is open. |
I am now satisfied that this is not a bug in Rebirth. To demonstrate:
In my opinion, if SDL were behaving properly, it would return a failure status from Demo program source: #include <SDL/SDL.h>
#include <SDL/SDL_video.h>
#include <stdio.h>
int main(int argc, char **argv)
{
const int width = 1024;
const int height = 768;
const int bpp = 32;
const Uint32 flags = SDL_OPENGL | SDL_FULLSCREEN;
SDL_Init(SDL_INIT_VIDEO);
printf("Checking video mode ...\n");
fflush(stdout);
int ok = SDL_VideoModeOK(width, height, bpp, flags);
printf("SDL_VideoModeOK=%i\nChanging video mode ...\n", ok);
fflush(stdout);
SDL_Surface *s = SDL_SetVideoMode(width, height, bpp, flags);
printf("SDL_SetVideoMode returned %p\n", s);
return 0;
} I also experimented (not shown) with changing the resolution without setting fullscreen, then adding fullscreen later. The first call, which changed the resolution without going to full screen mode, succeeded. The second call, which added the full screen flag, still caused Xlib to terminate the program. I should also note that SDL2 does not offer |
Tried something like this with |
It appears that Super Tux Kart always uses SDL2. I noted above that SDL2 does not even provide the function which causes the hard exit in this scenario. Rebirth optionally can use SDL2, if requested at build time. Does the demo program I posted in #671 (comment) work for you, or abort like Rebirth does? |
saved the code from #671 (comment) as Desktop 3840x2160, The first run it changed the resolution, I set the resolution back, but after that, each run just blinked the display and showed a blank window very briefly, and outputted text. Then tried setting desktop to 800x600, then each run all it did was blink the display briefly and outputted text.
The SDL_SetVideoMod returned always started with a 0x5 and always ended with 2b0, the stuff in-between varied each run. UPDATE: I set resolution to 800x600, rebooted, and ran script,
Still at 800x600. Set it back to 3840x2160, rebooted, and tried again. *1 |
SDL2 is the way forwards anyways. Are there still things keeping DXX from being full time SDL2? I stopped using SDL1 for the exact reason of poor monitor handling and the fact that it COULD change video modes. Have a portrait monitor rotated to landscape? Say goodbye to your layout on SDL1. SDL2 will leave your native desktop resolution and render at whatever you request internally preserving alt tab, monitors blanking out, and your sanity. Upstream SDL2 even provides a backwards compat 1.2 library that shims over to SDL2 for all of these same reasons. |
#474 reported several problems with SDL2. All but the sound problem were fixed quite a while ago. @raptor contributed #651 to try to fix the sound problem. However, according to #474 (comment), there are problems with it. I have not yet had time to fix those. As I understand #671 (comment), that confirms my prior posts: SDL1 provokes an Xlib problem in these circumstances, even when Rebirth is not used. Since Rebirth is only telling SDL1 to set the video mode, and is relying on SDL1 to do that or report an error (but not terminate the program), I do not see that there is anything I can do here. As I invited above, if you have a reference for how I can detect that the requested mode will be fatal, I could look at handling it. Otherwise, this will need to be treated as an SDL1 bug. |
Linux
Debian Stable, Debian GNU/Linux 11 (bullseye)
KDE desktop with Compiz
d2x-rebirth crashes if resolution is raised higher than the desktop resolution, even if the display, etc.. is capable of handling it.
e.g. if on a 3840x2160 display, d2x-rebirth is set to 3200x1800, and the desktop is also at that 3200x1800 resolution when d2x-rebirth starts, and then d2x-rebirth is later set to 3840x2160, d2x-rebirth will crash.
Crash Error Message:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 153 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x7bc
Serial number of failed request: 209
Current serial number in output stream: 211
DXX-Rebirth: OpenGL: fence sync object was never destroyed!
(didn't test with d1x-rebirth)
The text was updated successfully, but these errors were encountered: