Bug 124644 - SDL_Init() hangs when $DISPLAY is remote
SDL_Init() hangs when $DISPLAY is remote
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
  Show dependency treegraph
Reported: 2004-05-27 23:58 EDT by Johann Schoonees
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-08 05:04:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johann Schoonees 2004-05-27 23:58:13 EDT
Description of problem:
SDL_init() never returns when the environment variable DISPLAY is set
to a remote computer.

Version-Release number of selected component (if applicable):
As released with Core 1: kernel 2.4.22, SDL 1.2.5, XFree86 4.3.0,
glibc 2.3.2.  Also got the same problem on RH7.1.

How reproducible:

Steps to Reproduce:
1. rlogin remote_computer
2. export DISPLAY=local_computer:0
3. any_SDL_app
Actual results:
SDL_Init() hangs and program has to be interrupted with Control-C.

Expected results:
SDL_Init() should return with either 0 on success or -1 on failure.

Additional info:
This has been reported elsewhere before, with no solution on offer:
Comment 1 Johann Schoonees 2004-05-28 00:05:43 EDT
Here is a trace (slightly edited):

$ rlogin remote_computer
$ export DISPLAY=local_computer:0
$ xclock &
$ gcc -g -O2 -Wall -W -I/usr/include/SDL -L/usr/lib -lSDL -lpthread
SDL-example-1-1.c -o SDL-example-1-1
$ gdb ./SDL-example-1-1
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /home/me/SDL-example-1-1
[Thread debugging using libthread_db enabled]
[New Thread 1076908160 (LWP 16505)]
Initializing SDL.

[It hangs here.  I had to interrupt with Control-C.]

Program received signal SIGINT, Interrupt.
[Switching to Thread 1076908160 (LWP 16505)]
0x40000c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0  0x40000c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x4018e2ad in ___newselect_nocancel () from /lib/tls/libc.so.6
#2  0x4024aae2 in _XPollfdCacheDel () from /usr/X11R6/lib/libX11.so.6
#3  0x4024ba51 in _XRead () from /usr/X11R6/lib/libX11.so.6
#4  0x4007022a in SDL_XF86VidModeGetAllModeLines ()
   from /usr/lib/libSDL-1.2.so.0
#5  0x4006a853 in X11_GetVideoModes () from /usr/lib/libSDL-1.2.so.0
#6  0x4006c44e in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#7  0x40061121 in SDL_VideoInit () from /usr/lib/libSDL-1.2.so.0
#8  0x4003db56 in SDL_InitSubSystem () from /usr/lib/libSDL-1.2.so.0
#9  0x4003db97 in SDL_Init () from /usr/lib/libSDL-1.2.so.0
#10 0x0804860a in main () at SDL-example-1-1.c:9
Comment 2 Johann Schoonees 2004-06-07 20:19:07 EDT
Resolved:  This behaviour only happens when the local X server is old.
 Red Hat 7.1 (Xfree86 4.0.3) misbehaves, but Fedora Core 1 is OK
(Xfree86 4.3.0).

Note You need to log in before you can comment on or make changes to this bug.