Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!linus!mir!dsr From: dsr@mir.mitre.org (Douglas S. Rand) Newsgroups: comp.windows.x Subject: Re: X programming question Message-ID: <1991Mar12.165125.16175@linus.mitre.org> Date: 12 Mar 91 16:51:25 GMT References: <4577@dftsrv.gsfc.nasa.gov> Sender: news@linus.mitre.org (News Service) Reply-To: dsr@mir.mitre.org (Douglas S. Rand) Organization: The MITRE Corporation Lines: 31 Nntp-Posting-Host: mir.mitre.org In article <4577@dftsrv.gsfc.nasa.gov>, njacobs@nssdca.gsfc.nasa.gov (Nick Jacobs) writes: > I'm new to X Window programming ... I typed in the example program > "helloworld.c" from Oliver Jones' book, "Introduction to the X Window > system", compiled, linked with the libs on a Sun, and ran it using > a remote server for the display (eXodus on a Mac, not that it should > matter). It does what it is supposed to do, except that when I tell it > to quit by hitting 'q', it crashes instead of terminating cleanly. > The error message is: > [2] Bus error xhello core dumped > > (I called it xhello). > All it does when it gets a 'q' that is different from any other > keypress (which it correctly ignores) is to call XFreeGC, > XDestroyWindow, XCloseDisplay and exit. Does anyone have any > idea why it should crash?? > > Nick I'll give you some observations. Your program is probably not dying because of an X server problem. It is probably dying because of a bad parameter passed to Xlib or even a bad pointer in your program. Did you try using a symbolic debugger to find out what source line killed it? X errors happen in a different way and result in a printed message (by default) and exiting to the shell. -- Douglas S. Rand Internet: Snail: MITRE, Burlington Road, Bedford, MA Disclaimer: MITRE might agree with me - then again... Amateur Radio: KC1KJ