Hang: SDL_x11modes, line 334 (cvs snap 12-dec-2001)

Hi,

I’m having some trouble with SDL wedging in a call to XVidMode()
in SDL_x11modes.c, line 334 (cvs snap 12-dec-2001; Redhat 7.1/7.2,
Intel). The hang only happens with a remote connection (ie,
$DISPLAY != :0.0).

There’s a moderately complicated set of checks that occur in the code
at this point intended to work around various bugs in different X
server vendors and versions. However, the comments seem to indicate
that this should work fine with >4.0.2, but I’m running 4.0.3 and
still getting a hang… I’ve appended a short program that wedges.

Note: If I go in with gdb and force buggy_X11==1 in
X11_GetVideoModes(), the test program runs without hanging.

Any ideas?

/jamie

----------------cut here with a sharp knife-----------------

#include <stdio.h>
#include <SDL/SDL.h>

sdl_open(int w, int h, int bpp, Uint32 flags)
{
/* Initialize the SDL library */
if (SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr,
“Couldn’t initialize SDL: %s\n”, SDL_GetError());
return(NULL);
}
SDL_SetVideoMode(w, h, bpp, flags);
}

main()
{
sdl_open(1024, 768, 32, 0);
SDL_Quit();
printf(“ok\n”);
}–
office: 510-643-3573 mail: 3210 Tolman Hall #1650
lab: 510-642-1950 U.C. Berkeley
fax: 801-697-4179 Berkeley, CA 94720-1650
email: @James_Mazer