Penguin Command segmantaion fault

Hi!

Penguin Command sometimes crashes at the startup. It crashes in
SDL_SetVideoMode, so It could be a problem with SDL.

Here’s the gdb output:

#0 0x40164aea in sigsuspend () from /lib/libc.so.6
#1 0x400987cb in pthread_getconcurrency () from /lib/libpthread.so.0
#2 0x40098376 in pthread_yield () from /lib/libpthread.so.0
#3 0x40167073 in exit () from /lib/libc.so.6
#4 0x402a94a2 in _XDefaultIOError () from /usr/X11R6/lib/libX11.so.6
#5 0x4004ace1 in xio_errhandler (d=0x81badd8) at SDL_x11video.c:259
#6 0x402a87e5 in _XIOError () from /usr/X11R6/lib/libX11.so.6
#7 0x402a6664 in _XRead () from /usr/X11R6/lib/libX11.so.6
#8 0x402a6f55 in _XReply () from /usr/X11R6/lib/libX11.so.6
#9 0x4036afb0 in XF86VidModeQueryVersion () from
/usr/X11R6/lib/libXxf86vm.so.1
#10 0x4036b551 in XF86VidModeGetModeLine () from
/usr/X11R6/lib/libXxf86vm.so.1
#11 0x4004788f in X11_ResizeFullScreen (this=0x81ba9b0) at
SDL_x11modes.c:128
#12 0x40047c42 in X11_EnterFullScreen (this=0x81ba9b0) at
SDL_x11modes.c:496
#13 0x40049f24 in X11_CreateWindow (this=0x81ba9b0, screen=0x81bb3a8,
w=800, h=600, bpp=32, flags=2415919104) at SDL_x11video.c:857
#14 0x4004a0ae in X11_SetVideoMode (this=0x81ba9b0, current=0x81bb3a8,
width=800, height=600, bpp=32, flags=2415919104)
at SDL_x11video.c:929
#15 0x4003f319 in SDL_SetVideoMode (width=800, height=600, bpp=32,
flags=2415919104) at SDL_video.c:605
#16 0x0804da8d in init_SDL () at gfx.c:106
#17 0x0804b451 in main (argc=1, argv=0xbffff884) at main.c:442
#18 0x401552eb in __libc_start_main () from /lib/libc.so.6

Thanks, Karl.

#0 0x40164aea in sigsuspend () from /lib/libc.so.6
#1 0x400987cb in pthread_getconcurrency () from /lib/libpthread.so.0
#2 0x40098376 in pthread_yield () from /lib/libpthread.so.0
#3 0x40167073 in exit () from /lib/libc.so.6
#4 0x402a94a2 in _XDefaultIOError () from /usr/X11R6/lib/libX11.so.6
#5 0x4004ace1 in xio_errhandler (d=0x81badd8) at SDL_x11video.c:259
#6 0x402a87e5 in _XIOError () from /usr/X11R6/lib/libX11.so.6

seems that xlib complains about an IO error, which is usually hard to recover
from. most of the time it comes from either using a non-thread-safe xlib
or having accidentally corrupted xlib’s internal data structures