Possible bug w/ multiple X servers running

Hi.

I am running two X servers on debian sarge, one on virtual terminal (VT)
7 (:0) and one on VT 8 (:8). I started a SDL app (fullscreen, hardware
acceleration) on :8, switched to :0 (CTRL-ALT-F7), and then (using my
control interface to my program) tried to switch hardware video modes on
VT 8 :8 from VT 7 :0 (in other words, I called SDL_SetVideoMode() on
an X server which was not attached to the active virtual terminal). This
caused SDL to segfault with the following traceback:

#0 0x40560cdf in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#1 0x4066bd9f in _XIOError () from /usr/X11R6/lib/libX11.so.6
#2 0x406694d3 in _XRead () from /usr/X11R6/lib/libX11.so.6
#3 0x4066a023 in _XReply () from /usr/X11R6/lib/libX11.so.6
#4 0x405648cf in SDL_XF86VidModeQueryVersion () from /usr/lib/libSDL-1.2.so.0
#5 0x40564d42 in SDL_XF86VidModeGetModeLine () from /usr/lib/libSDL-1.2.so.0
#6 0x4055f086 in SDL_XF86VidModeGetModeInfo () from /usr/lib/libSDL-1.2.so.0
#7 0x4055fba1 in X11_ResizeFullScreen () from /usr/lib/libSDL-1.2.so.0
#8 0x405624a1 in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#9 0x40562601 in X11_CheckMouseMode () from /usr/lib/libSDL-1.2.so.0
#10 0x40556dfa in SDL_SetVideoMode () from /usr/lib/libSDL-1.2.so.0

Is this an obscure feature or a bug? The segfault is probably caused by
the lock call in X11_CheckMouseMode() (if I remember correctly, calling
posix thread locking functions twice in a row causes segfaults if the
locks aren’t debugging locks).

Thanks for your time,
-Andy Martin

/***************************

  • C. Andy Martin
  • Senior Software Engineer
  • Lumenware, LLC
  • A036 ASTeCC Building
  • University of Kentucky
  • Lexington, KY 40506-0286
  • (859) 257-2300 x298
  • @C_Andy_Martin
    ***************************/