Segmentation fault in XLookupString()

From: Björn Sachsenberg (eloso_at_gmx.de)
Date: 08/23/03


Date: 22 Aug 2003 16:33:32 -0700

Hi,

i've written a simple x prog in c++. In my main event loop when i get
an KeyPress event i'm calling XLookupString to get the character code
of the key which is causing an segmentation fault.

The gdb backtrace says the following:
Program received signal SIGSEGV, Segmentation fault.
0x40005453 in _dl_map_object_internal () from /lib/ld-linux.so.2
(gdb) bt
#0 0x40005453 in _dl_map_object_internal () from /lib/ld-linux.so.2
#1 0x4023ac3b in dl_open_worker () from /lib/libc.so.6
#2 0x4000aa78 in _dl_catch_error_internal () from /lib/ld-linux.so.2
#3 0x4023b23f in _dl_open () from /lib/libc.so.6
#4 0x40907e8b in dlopen_doit () from /lib/libdl.so.2
#5 0x4000aa78 in _dl_catch_error_internal () from /lib/ld-linux.so.2
#6 0x40908266 in _dlerror_run () from /lib/libdl.so.2
#7 0x40907ed4 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2
#8 0x403cebd9 in _XlcDynamicLoad () from /usr/X11R6/lib/libX11.so.6
#9 0x4039e5a9 in _XOpenLC () from /usr/X11R6/lib/libX11.so.6
#10 0x4039e773 in _XlcCurrentLC () from /usr/X11R6/lib/libX11.so.6
#11 0x403a8f20 in _XkbGetCharset () from /usr/X11R6/lib/libX11.so.6
#12 0x403a7845 in XkbTranslateKeySym () from
/usr/X11R6/lib/libX11.so.6
#13 0x403a797d in XLookupString () from /usr/X11R6/lib/libX11.so.6
#14 0x0804df08 in BGL::Window::run() (this=0x805a688) at
Window.cpp:505
#15 0x0804be0d in main () at gltest.cpp:199
#16 0x4014d7a7 in __libc_start_main () from /lib/libc.so.6

hope someone can help

thanks in advance

Björn Sachsenberg