SDL_Quit hangs

My application uses SDL 1.2. This time, it hanged in X11_CheckMouseMode. Here’s the backtrace:

#0 0xa7d592f0 in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#1 0xa7d28eb5 in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#2 0xa7d28f80 in SDL_Quit () from /usr/lib/libSDL-1.2.so.0
#3 0x081edc76 in ~SDL_Finalizer (this=0x8281c1d) at OpenGL/OrbiterRenderer_OpenGL.cpp:47
#4 0x081edb3e in __tcf_1 () at OpenGL/OrbiterRenderer_OpenGL.cpp:51
#5 0xa78ea192 in exit () from /lib/tls/libc.so.6
#6 0xa78d497e in __libc_start_main () from /lib/tls/libc.so.6
#7 0x0806cf11 in _start () at …/sysdeps/i386/elf/start.S:102

Somethings it crashes in X11_CheckMouseMode, but I’m not sure if it’s a problem with nvidia drivers we are using (the latest) with opengl and composite extension or from xrecord extension:

(gdb) bt
#0 0xa7d8911c in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#1 0xa7c95acf in _XIOError () from /usr/lib/libX11.so.6
#2 0xa7c926ec in _XFlush () from /usr/lib/libX11.so.6
#3 0xa7c93d0d in _XReply () from /usr/lib/libX11.so.6
#4 0xa7ef07eb in XRecordEnableContext () from /usr/lib/libXtst.so.6
#5 0x0813bb3c in XRecordExtensionHandler::recordingThreadMainFunction (arguments=0x8b675d8) at Linux/XRecordExtensionHandler.cpp:119
#6 0xa7b10b63 in start_thread () from /lib/tls/libpthread.so.0
#7 0xa79c918a in clone () from /lib/tls/libc.so.6

(gdb) thr 8
[Switching to thread 8 (process 13811)]#0 0xa79c2114 in ioctl () from /lib/tls/libc.so.6
(gdb) bt
#0 0xa79c2114 in ioctl () from /lib/tls/libc.so.6
#1 0xa7ec57de in _nv000010gl () from /usr/lib/libGL.so.1
#2 0xa73ff3da in _nv000109gl () from /usr/lib/libGLcore.so.1

Any ideas ?

Thanks you,

Cristian Miron
Pluto

Phone: (877) pluto-4-u ext. 110
Email: @Cristian_Miron
Web: http://www.plutohome.com/