SDL_Init(SDL_INIT_VIDEO) crashing because of XFlush(display)

I have the following code:

Code:
#include <SDL.h>

int main(){
SDL_Init( SDL_INIT_VIDEO);
return 0;
}

Giving me the following crash:

Code:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 148 (XInputExtension)
Minor opcode of failed request: 46 ()
Value in failed request: 0x12
Serial number of failed request: 127
Current serial number in output stream: 130

Tracking down:

Code:
XFlush(display); // line 682 from void X11_SetWindowTitle(_THIS, SDL_Window * window) from src/video/x11/SDL_x11window.c

#0 X11_SetWindowTitle() at src/video/x11/SDL_x11window.c:681
#1 SDL_CreateWindow() at src/video/SDL_video.c:1207
#2 ShouldUseTextureFramebuffer() at src/video/SDL_video.c:173
#3 SDL_VideoInit() at src/video/SDL_video.c:522
#4 SDL_InitSubSystem() at src/SDL.c:73
#5 SDL_Init() at src/SDL.c:149

Using SDL2 from hg rev 6380
(Also tried snapshot from Thu Jul 19 with same result.)
Build SDL2:

Code:
./configure
make
sudo make install

Using Debian testing 64bit with fglrx 12-4 on a HD 4250

XFlush() forces queued commands to be sent to the server. The real issue
almost undoubtedly from earlier executed code, and judging by the
XInputExtension as the major opcode, probably due to improper handling with
an XInput extension. I’m not overly familiar with what X extensions are
used by SDL, maybe someone else can pick up on that?

PatrickOn Wed, Jul 25, 2012 at 12:13 PM, Kakarott wrote:

**
I have the following code:

Code:

#include **

int main(){
SDL_Init( SDL_INIT_VIDEO);
return 0;
}

Giving me the following crash:

Code:

X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 148 (XInputExtension)
Minor opcode of failed request: 46 ()
Value in failed request: 0x12
Serial number of failed request: 127
Current serial number in output stream: 130

Tracking down:

Code:

XFlush(display); // line 682 from void X11_SetWindowTitle(_THIS,
SDL_Window * window) from src/video/x11/SDL_x11window.c

#0 X11_SetWindowTitle() at src/video/x11/SDL_x11window.c:681
#1 SDL_CreateWindow() at src/video/SDL_video.c:1207
#2 ShouldUseTextureFramebuffer() at src/video/SDL_video.c:173
#3 SDL_VideoInit() at src/video/SDL_video.c:522
#4 SDL_InitSubSystem() at src/SDL.c:73
#5 SDL_Init() at src/SDL.c:149

Using SDL2 from hg rev 6380
(Also tried snapshot from Thu Jul 19 with same result.)
Build SDL2:

Code:

./configure
make
sudo make install

Using Debian testing 64bit with fglrx 12-4 on a HD 4250


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org