[comp.windows.x] Novice X user with error

meh@wucs1.wustl.edu (Mark E Hunter) (10/05/90)

Hi, 
	I am a relatively novice user of X.  I have a third party
program which has started spewing X errors with increasing frequency.

Could someone please :

a) tell me what is wrong (guess)
b) tell me what the fields of the error message means.


thanks,


X Error:  BadMatch
  Request Major code 62 ()
  Request Minor code 14
  ResourceID 0x800048
  Error Serial #166
  Current Serial #212

This is on a Sun4/60 running openwindows 2.0.



Mark Hunter

meh@wucs1.wustl.edu

klee@wsl.dec.com (Ken Lee) (10/06/90)

In article <1990Oct5.143447.23555@cec1.wustl.edu>, meh@wucs1.wustl.edu (Mark E Hunter) writes:
|> Could someone please :
|> 
|> a) tell me what is wrong (guess)
|> b) tell me what the fields of the error message means.
|> 
|> X Error:  BadMatch
|>   Request Major code 62 ()
|>   Request Minor code 14
|>   ResourceID 0x800048
|>   Error Serial #166
|>   Current Serial #212

Step 1:  Look up major code 62 in /usr/include/X11/Xproto.h.  It turns
out to be the CopyArea protocol request.  Note that many Xlib implementations
will do this for your.

Step 2:  Check appendix A of Scheifler & Gettys *X Window System* book
to find out which Xlib functions could generate that request.  For
CopyArea, there is only XCopyArea.

Step 3:  Check the function description in the same book.  Under
"XCopyArea" it says "The drawables must have the same root and depth,
or a BadMatch error results."

Thus, your problem is most likely that either your program is copying
pixels from one screen to another (different root) or copying from a
monochrome window to a color window (different depth).  Neither
operation is supported by the X protocol, though simple alternatives
exist for both.

In answer to your second question, only the error name and major
request are needed for most debugging.  Occassionally, the resourceID
is also useful, usually to see that it is out of range.  The other
fields are only useful to hardcore protocol hackers.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee