I can reproducibly have a crash in SDL with isolated code.
This crash was produced on Redhat 9.0 with SDL 1.2.6-1.i386.rpm from
the official website. I cannot produce this crash with the
SDL-1.2.5-3.i386.rpm that ships with Redhat 9.
The below code was compiled with:
g++ sdl-config --libs --cflags
-g
This bug only happens in fullscreen. Unfortunately, I cannot get a
backtrace if I am running SDL in fullscreen. I have to kill -9 the
process, which causes gdb to segfault if you request a backtrace
afterwards. However, I can supply the following information:
Begin GDB output----------------
0x4004dd70 in set_best_resolution (this=0x8049ea8, width=1024, height=768)
at SDL_x11modes.c:139
139 if ( (modes[i]->hdisplay != mode.hdisplay) ||
End GDB output
This only occurs when I have both of my monitors enabled. I run dual
monitors: one at 1600x1200x32bpp @85hz and the other at
1280x1024x32bpp @85hz. I am not running Xinerama. My video card is a
GeForce ti4200 running Nvidia’s binary drivers.
When I run only using the primary monitor (1600x1200x32bpp @85hz), the
crash is nonexistant. The way my XF86Config is configured, I don’t
specify a wide array of video modes when in dual monitor layout, but
in single monitor layout (which I use for gaming), I specify many,
including 1024x768, which is what the code below highlights.
My XF86Config is available here:
http://shambler.dhs.org/~sludge/XF86Config
X -version returns 4.3 (Redhat 9 stock). I am running Gnome.
SDL seems to build a white square, and then it simply exits.
Let me know if there is a better place to report bugs, or if I can be
of further help.
Begin code
#include
#include
#include<SDL.h>
using namespace std;
int main( int argc, char **argv )
{
if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE |
SDL_INIT_JOYSTICK ) < 0 )
{
cerr << "Unable to init SDL video: " << SDL_GetError() <<
endl;
exit(1);
}
cout << "SDL_Init returned properly... Now, let's try
SDL_SetVideoMode" << endl;
SDL_Surface *screen = SDL_SetVideoMode( 1024, 768, 32,
SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF );
cout << "If we're printing this, we're doing better than expected." << endl;
}
–
Michael L. Labbe
http://www.threewavesoftware.com
(604)552-9283 8:00am-6:00pm PST