Segfault on Linux

Hi all,

I’m picking development of an app that uses libsdl. There are various
issues, and I need to get a debugger on them asap. I tend to use ddd as I’m
not really that au-fait with gdb from the command line.

However, one issue that makes it difficult to use the graphical debugger is
that when I run the app with SDL_RESIZABLE instead of SDL_FULLSCREEN, any
attempt to e.g. minimise or move the app window, or cause it to lose focus,
results in a segfault.

#0 0xb7bbbaed in getenv () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7e1d8b4 in X11_KeyToUnicode () from /usr/lib/libSDL-1.2.so.0
#2 0xb7e194fa in X11_KeyToUnicode () from /usr/lib/libSDL-1.2.so.0
#3 0xb7de79f5 in SDL_PumpEvents () from /usr/lib/libSDL-1.2.so.0
#4 0xb7de7ef7 in SDL_PollEvent () from /usr/lib/libSDL-1.2.so.0
#5 0x080581ab in GAMEOBJ::ProcessEvents (this=0xbffd0ca8) at gameobj.cpp
:587
#6 0x080584e5 in GAMEOBJ::Idle (this=0xbffd0ca8) at gameobj.cpp:518
#7 0x0804bd7f in main () at invaders.cpp:90

I just wanted to confirm that I’m not doing anything silly - this is
supported by libsdl, right? Using libsdl 1.2.11, xorg 7.1 on Debian Etch.

I even tried looking at SDL_PumpEvents - I can’t see that this even calls
X11-KeyToUnicode, and nor that X11-KeyToUnicode calls getenv. I’d really
appreciate a clue, and I can provide more info if you tell me what you need.

TD