The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_Init(SDL_INIT_VIDEO) crashing because of XFlush(display)
Kakarott


Joined: 15 Sep 2009
Posts: 7
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
SDL_Init(SDL_INIT_VIDEO) crashing because of XFlush(display)
Patrick Baggett
Guest

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?

Patrick

On Wed, Jul 25, 2012 at 12:13 PM, Kakarott wrote:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org