bonobo/ORBit bugs



Package: bonobo
Version: CVS, 14/8/99

bonobo/test-container segfaults if I try to launch a Gnumeric worksheet from
within it. Part of the problem is probably my old version of gnumeric which
crashes when sent a GNOME_Unknown_query_interface message. However, bonobo
should be able to recover gracefully from this. I tracked down the problem
to gnome-object-client.c. Apparently when querying the PersistentFile interface,
gnome_object_restore_from_url assumes that a non-NULL return value means
that the call has succeeded. However, the stubs generated by the ORBit IDL
compiler seem to return an undefined value when an exception is encountered.
The problem can be fixed by the following patch to bonobo.

However, I don't know whether this is the right thing to do, or whether ORBit
really should return CORBA_OBJECT_NIL on error.

Also, in the same situation when the server dies, "CRITICAL" errors are
generated in the ORBit stubs because giop_send_buffer_unuse / 
giop_recv_buffer_unuse are called at the _ORBIT_system_exception label,
even though the buffer pointers have already been set to NULL (of course this
is merely a cosmetic problem).

My bonobo patch:

diff -U3 -r bonobo-old/bonobo/gnome-object-client.c bonobo/bonobo/gnome-object-client.c
--- bonobo-old/bonobo/gnome-object-client.c	Sat Aug 14 20:34:15 1999
+++ bonobo/bonobo/gnome-object-client.c	Sun Aug 15 16:34:32 1999
@@ -167,6 +167,7 @@
 	 */
 	persist = (GNOME_PersistFile) GNOME_Unknown_query_interface (
 		rtn, "IDL:GNOME/PersistFile:1.0", &ev);
+	if (ev._major != CORBA_NO_EXCEPTION) persist = NULL;
 
 	if (persist) {
 		gboolean success = FALSE;
@@ -192,6 +193,7 @@
 		
 		persist = GNOME_Unknown_query_interface (
 			rtn, "IDL:GNOME/PersistStream:1.0", &ev);
+		if (ev._major != CORBA_NO_EXCEPTION) persist = NULL;
 
 		CORBA_exception_free (&ev);
 		


Peter Wainwright
Home: prw@wainpr.demon.co.uk     Work: peter.wainwright@nrpb.org.uk
http://www.wainpr.demon.co.uk    Fax: +44-870-052-3185
Visit the Opera Exchange Homepage at http://www.treda.co.uk/opex/




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