Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bloom-beacon!SHAMASH.MCRCIM.MCGILL.EDU!mouse From: mouse@SHAMASH.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: problem with XLoadQueryFont on HPUX machines? Message-ID: <9009112315.AA07792@shamash.McRCIM.McGill.EDU> Date: 11 Sep 90 23:15:03 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 48 > I've run into a problem with a very basic program which runs fine on > a Sun sparcstation running X11.4, but blows up on an HPUX 7.0 machine > running X11.3. > All I'm doing is opening a display, creating and setting a tile, then > when I call XLoadQueryFont ... kaboom! The error is: > X Protocol error detected by server: BadMatch, invalid parameter attributes > Failed request major op code 56 (X_ChangeGC) > The program code follows: > /* debug (synchronous) X mode switch, non-zero = on */ > #define _Xdebug 1 This will not do what the comment implies you expect it to do. _Xdebug is not a #define but a variable. You either want int _Xdebug = 1; or you want to call XSynchronize(). I am not sure the former works; _Xdebug appears to me to be intended to be patched by debuggers, not set by programs. Calling XSynchronize should work fine. > gc = DefaultGC(dpy, screen); > tile = XCreateBitmapFromData(dpy, RootWindow(dpy, screen), > gray_bits, gray_width, gray_height); > XSetTile(dpy, gc, tile); Wait a sec, who says the default GC is only one bit deep? This certainly makes a lot more sense as the source of the bogus ChangeGC protocol request than the XLoadQueryFont below. > font_info = XLoadQueryFont(dpy, fontname); > As I said, it works fine on Sun, but blows up on HP risc machines. I > have tried everything I can think of ... any help would be greatly > appreciated. Two things, then. One, are all the Suns 1-bit and the HP more than 1 bit? Two, did you ever try commenting out *just* the XLoadQueryFont line and seeing if *that* ever worked on the HP? If not, don't jump to the conclusion that it's the line at fault.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu