Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!cornell!tclark From: tclark@honir.cs.cornell.edu (Timothy Clark) Newsgroups: comp.windows.x Subject: problem with XLoadQueryFont on HPUX machines? Message-ID: <45608@cornell.UUCP> Date: 10 Sep 90 22:40:36 GMT Sender: nobody@cornell.UUCP Reply-To: tclark@cs.cornell.edu (Timothy Clark) Distribution: comp Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 70 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) > Failed request minor op code 0 (if applicable) > ResourceID 0x0 in failed request (if applicable) > Serial number of failed request 7 > Current serial number in output stream 8 The program code follows: #include "spread.h" /* debug (synchronous) X mode switch, non-zero = on */ #define _Xdebug 1 static char gray_bits[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa}; void main (argc, argv) int argc; char **argv; { char displayname[32]; char *fontname; XFontStruct *font_info; gethostname (name, 19); for (namelen = 0; name[namelen] && name[namelen] != '.' && namelen < 18; namelen++) continue; name[namelen] = '\0'; dpy = XOpenDisplay (displayname); if (dpy == (Display *)0) { printf("Unable to establish xwindow connection.\n"); exit(0); } screen = DefaultScreen(dpy); gc = DefaultGC(dpy, screen); black = BlackPixel(dpy, screen); white = WhitePixel(dpy, screen); tile = XCreateBitmapFromData(dpy, RootWindow(dpy, screen), gray_bits, gray_width, gray_height); XSetTile(dpy, gc, tile); fontname = NORMALFONT; /* #define NORMALFONT "8x13" */ font_info = XLoadQueryFont(dpy, fontname); printf("no problem ... past XLoadQueryFont\n"); } 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. --Tim tclark@cs.cornell.edu