[comp.windows.x] Mysterious disappearing clients

usenet@cps3xx.UUCP (Usenet file owner) (08/18/89)

   I have been developing an X windows application that does some manipulations
on images.  Everything works fine on the machine that I usually do
my work on.  I run the program on a Sun 4/OS4.0 and run X windows on a 
Sun 4/OS3.5, using xhost, and the DISPLAY environment variable I 
make the display on the later.  Then I tried to use the display on a Sun 3/110
running OS4.0 and bang, I have a problem.

   Here is the code where it crashes:

    imagepixs = (XImage *) XGetImage(dpy, w->canvas.pmap, 0, 0,
                w->core.width,
                w->core.height,
 
   Where dpy is the display, w->canvas.pmap is a valid (I guess) pixmap, and
width,height are integers.

The error I get is:

XIO:  fatal IO error 32 (Broken pipe) on Xserver "hobbes:0.0"
      after 35919 requests (35918 known processed) with 4 events remaining.
      The connection was probably broken by a server shutdown or KillClient.

   What happens is that in the line of code above after it is executed, all the
windows of my application die (disappear), and then the next X operation 
yields the XIO error.

   Interestingly enough if I use gdb to step through the function that has the 
line of code above, the program will NOT crash (and still not work right),
but the next time it executes that line (not stepping) it will.
(The way that I can step through XGetImage, is I compiled it into my code as
  XGetImage2 and called that instead)

   If anybody has any ideas why this is, I would appreciate it if you could 
Email me directly.

Thanks, Brett Harper

harperb@frith.egr.msu.edu
...!uunet!frith!harperb