Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Is there some way to find out what a BadMatch is about? Message-ID: <9106221640.AA00674@lightning.McRCIM.McGill.EDU> Date: 22 Jun 91 16:40:45 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 26 > I've got this program which works fine on monochrome screens, but > when I try running it on a PseudoColor screen I get BadMatch errors > from innocuous calls like XDrawPoint and XFillRectangle. So I was > just wondering if anyone has any tricks for finding out what the > server thinks doesn't match. I suppose I could run the server in a > debugger, but that's a hassle. Run it under xscope, that's what I find is generally best. That way you can see precisely what requests are being sent.... > More details: I'm drawing to an off-screen Pixmap created with > XCreatePixmapFromBitmapData(display,root,data,width,height,1L,0L,1). > The GC's I use have foreground and background set to 1L and 0L, and > planemask set to 1L. Aha. I bet the GC was created with a depth equal to the default depth of the screen, and you're trying to use it with a pixmap that's always of depth 1. (Also, with those arguments, XCreatePixmapFromBitmapData is overkill; just use XCreateBitmapFromData instead.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu