[comp.windows.x] X11R3 server bug?

uhley@tybalt.caltech.edu (John Uhley) (11/02/88)

In running an application which redefines the color maps for all windows under
the root window of the display I seem to have done *something* which breaks my
X server.  Any future requests made to the server after I run my re-coloring
code result in the following error message:

X Protocol error:  BadMatch, invalid parameter attributes
  Major opcode of failed request:  1 (X_CreateWindow)
  Minor opcode of failed request:  0
  Resource id in failed request: 0x8006b
  Serial number of failed rquest:  30
  Current seriel number in output stream:  38

Is this a known bug?  Any previously opened X windows (ie: xterms) are still 
happy, but any new windows I try to create give my a BadMatch.

	John Uhley
	uhley@smaug.caltech.edu
	uhley@tybalt.caltech.edu

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (11/03/88)

    In running an application which redefines the color maps for all windows
    under the root window of the display I seem to have done *something* which
    breaks my X server.

As usual, it would help a lot to know a lot more about exactly what your
code is doing.  But, here is a wild guess.  If you are creating a new
colormap and storing as the colormap attribute of the root window, and
then having that client terminate with a CloseDownMode of DestroyAll,
then the result is that the colormap gets destroyed and the root window
ends up with a colormap of None.  All further attempts by clients to
create a top-level window with colormap CopyFromParent (which is what
most clients do) will get a BadMatch error because the colormap of
the parent is None.

The protocol probably ought to special-case the root window and
force its colormap back to the default colormap, but on the other
hand, you shouldn't be playing with global resources without
proper supervision. :-)