bonobo XError crashing bug



BonoboSocket does a bunch of "gdk_error_trap_push(); XDangerousFooBar();
gdk_error_trap_pop()" sequences, but unfortunately, Bonobo breaks that
idiom... As a result, evolution is currently crashing a lot for me.

This makes Bonobo work the way that the comment above
bonobo_setup_x_error_handler claims it already does. :)

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.571
diff -u -r1.571 ChangeLog
--- ChangeLog	2000/10/07 16:21:22	1.571
+++ ChangeLog	2000/10/07 20:19:16
@@ -1,3 +1,9 @@
+2000-10-07  Dan Winship  <danw helixcode com>
+
+	* bonobo/bonobo-main.c (bonobo_x_error_handler): Hand off to
+	gdk_x_error if it's not something we're ignoring, so that
+	gdk_error_trap_{push,pop} continue to work as expected.
+
 2000-10-07  Andy Hertzfeld  <andy eazel com>
 
 	* bonobo/bonobo-win.c: (toolbar_build_widget):
Index: bonobo/bonobo-main.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-main.c,v
retrieving revision 1.31
diff -u -r1.31 bonobo-main.c
--- bonobo/bonobo-main.c	2000/09/21 14:10:42	1.31
+++ bonobo/bonobo-main.c	2000/10/07 20:19:16
@@ -61,11 +61,11 @@
 	return __bonobo_poa_manager;
 }
 
+static int (*gdk_x_error) (Display *, XErrorEvent *);
+
 static int
 bonobo_x_error_handler (Display *display, XErrorEvent *error)
 {
-	char buf [64];
-
 	if (!error->error_code)
 		return 0;
 
@@ -80,16 +80,10 @@
 		return 0;
 
 	/*
-	 * If it wasn't a BadDrawable error, we abort.
+	 * Otherwise, let gdk deal.
 	 */
-
-	XGetErrorText (display, error->error_code, buf, 63);
-
-	g_error ("%s\n  serial %ld error_code %d request_code %da minor_code %d",
-		 buf, error->serial, error->error_code, error->request_code,
-		 error->minor_code);
 
-	return 0;
+	return gdk_x_error (display, error);
 }
 
 /**
@@ -121,7 +115,7 @@
 
 	error_handler_setup = TRUE;
 
-	XSetErrorHandler (bonobo_x_error_handler);
+	gdk_x_error = XSetErrorHandler (bonobo_x_error_handler);
 }
 
 /**




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