Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!lance!ptcburp!fbm From: fbm@ptcburp.ptcbu.oz.au (Farrell McKay) Newsgroups: comp.windows.x Subject: Quirky XtDestroyApplicationContext......??????? Keywords: Toolkit ApplicationContext Message-ID: <1991May27.233521.8996@ptcburp.ptcbu.oz.au> Date: 27 May 91 23:35:21 GMT Organization: Pyramid Technology Corporation Lines: 61 Below is a very short X Toolkit based program. It just creats a widget, realizes it, and then exits. Pretty complex, eh? The only problem is that when I compile and run it on my machine, I get an error from XtDestroyApplicationContext. Has anyone else out there seen this behaviour? Does the same thing happen for you? -m------- Farrell McKay, fbm@ptcburp.oz.au ---mmm----- Pyramid Technology Aust., ...!munnari!ptcburp.oz!fbm -----mmmmm--- Research Park, Bond University, +61 75 950256 -------mmmmmmm- Gold Coast, Qld 4229, AUSTRALIA +61 75 522475 FAX ---------------------------------- cut cut ------------------------------------- #include #include #include #include String fallbacks[] = { "*Label.Label: This is a label widget", NULL }; XtAppContext app; Widget top; Widget label; /* * This program creates a widget, realizes it, and then exits. * To compile this program simply type:- * cc -DXAW_BC it.c -o it -lXaw -lXmu -lXt -lXext -lX11 * * Running this program generates the following message from within * XtCloseDisplay within XtDestroyApplication:- * * X Error of failed request: BadAccess (attempt to access private resource denied) * Major opcode of failed request: 88 (X_FreeColors) * Minor opcode of failed request: 0 * Resource id in failed request: 0x4077ffff * Serial number of failed request: 27 * Current serial number in output stream: 30 * */ main(argc, argv) int argc; char *argv[]; { top = XtAppInitialize(&app, "Xlabel", NULL, 0, &argc, argv, fallbacks, NULL, 0); label = XtCreateManagedWidget("label", labelWidgetClass, top, NULL, 0); XtRealizeWidget(top); XtDestroyApplicationContext(app); exit(0); }