Re: Killing X-server on Solaris 2.6

Todd Dukes <> writes:

> I have downloaded glib 1.1.2 and gtk+- 1.1.1 and
> built them on  Solaris with egcs 1.03. Everything
> seems to build ok.
> When I first ran gtk/testgtk, I clicked on the
> gamma curve button. The entire screen went white
> and the CDE login screen appeared. It appears
> that gtk+ has the ability to kill Sun's X-server.
> I was able to repeat this at least twice in a row.
> We tried it on another machine and X did not die.
> The gamma curve dialog appeared to work normally.
> I went back to my machine and tried it again. This
> time the gamma curve seemed to work ok, but I was
> able to kill X again by playing with the shaped 
> windows.

Hmmm, interesting. These seems to be approximately the same ways that
people have been getting "BadAccess (attempt to access private
resource denied)" errors with Linux/Alpha.

Which seems to hint that GTK+ might be doing something wrong, or at
least highly non-standard....

(Not that there is any excuse for the X server dying. I would guess
that Sun's make up < 10% of the GTK+ user base, but they account for
virtually all of the reports I've seen of GTK+ killing the X server)

>From looking at the Alpha bug reports, what I think is happening is
that GDK is creating a shared memory image, calling XShmPutImage to
draw it on the screen, then destroying the shared memory immediately,
which (depending on the circumstances) may be before X actually starts
drawing with the image.

For XFree86 on the Alpha, the Xserver checks, catches the problem, and
sends an error to the client; on Xsun the server blindly reads from
the segment and segfaults.

Please try the following patch to gdkimage.c and see if it helps (I'm
not sure if this is the right final solution, but it will at least
tell me if I'm on the right track or not.)

Index: gdkimage.c
RCS file: /cvs/gnome/gtk+/gdk/gdkimage.c,v
retrieving revision 1.5
diff -u -r1.5 gdkimage.c
--- gdkimage.c	1998/05/03 22:33:25	1.5
+++ gdkimage.c	1998/08/28 13:29:46
@@ -405,6 +405,8 @@
 #ifdef USE_SHM
+      gdk_flush();
       XShmDetach (private->xdisplay, private->x_shm_info);
       XDestroyImage (private->ximage);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]