Bug#222346: [moz-bonobo-list] Bug#222346: gpdf,mozilla-bonobo not working

Jean Bréfort Jean Bréfort , 222346@bugs.debian.org
13 Apr 2004 10:20:33 +0200


--=-tJH9D4mPegIsIYMt6dyx
Content-Type: multipart/mixed; boundary="=-xj9kJ5BWBtjB3dqKnyRg"


--=-xj9kJ5BWBtjB3dqKnyRg
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Le dim 04/04/2004 =C3=A0 19:44, Mark Howard a =C3=A9crit :
> Hi,
>=20
> This issue is still not resolved. I think #222346 and #228051 are the
> same issue. moz-bonobo-list archives seem to suggest that this is
> a mozilla problem. The mozilla-bonobo README points to
> http://bugzilla.mozilla.org/show_bug.cgi?id=3D201158 but this has the
> comment "OK, my patch is checked in now." from November last year.
>=20
> Does anyone have any ideas what is causing this bug now?=20
> I don't think it is due to the above mozilla report since the window
> isn't resized, it is just the initial size. Also, the cursor appears to
> be interacting with gpdf underneath the gray screen.=20
>=20
> IMHO, this should be a RC bug -- it completely breaks the main use of
> mozilla-bonobo and also gpdf (the way I use it anyway).=20

It is a GPdf bug. GPdf exports a broken Bonobo/PersistStream interface
(it is disabled in GNOME_PDF.server but not in the executable). The
Bonobo/PersistFile works but mozilla-bonobo use the stream interface
when available.
I have written a test container and when using the stream interface, I
get a BonoboException:
 WARNING **: Exception Unknown CORBA exception id:
'IDL:omg.org/CORBA/INV_OBJREF:1.0' occured

One way to fix the problem is to try the PersistFile interface if the
PersistStream fails, not only if it does not exist. I join a patch for
src/mozilla-bonobo-viewer.c which fixes the problem.

--=-xj9kJ5BWBtjB3dqKnyRg
Content-Disposition: attachment; filename=mozilla-bonobo-viewer.c.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=mozilla-bonobo-viewer.c.patch; charset=UTF-8

--- mozilla-bonobo-viewer.c	Tue Apr 13 10:18:18 2004
+++ mozilla-bonobo-viewer.c.new	Tue Apr 13 10:18:55 2004
@@ -158,51 +158,49 @@
 =09
 	bcontrol =3D bonobo_control_frame_get_control(control_frame);
=20
 	ps =3D Bonobo_Unknown_queryInterface(bcontrol, "IDL:Bonobo/PersistStream:=
1.0", &ev);
=20
-	if (BONOBO_EX(&ev)) {
+	if (!BONOBO_EX(&ev)) {
+		Bonobo_Stream s;
+	=09
 		CORBA_exception_free(&ev);
 		CORBA_exception_init(&ev);
 	=09
-		f =3D Bonobo_Unknown_queryInterface(bcontrol, "IDL:Bonobo/PersistFile:1.=
0", &ev);
+		s =3D bonobo_get_object(url, "IDL:Bonobo/Stream:1.0", &ev);
 		if (BONOBO_EX(&ev)) {
 			char *text =3D bonobo_exception_get_text(&ev);
-			printf("Exception at queryInterface(File): %s\n", text);
+			fprintf(stderr, "Exception at getObject(stream): %s\n", text);
 			g_free(text);
-		=09
-			control =3D bonobo_widget_new_control(url, CORBA_OBJECT_NIL);
-		=09
-			CORBA_exception_free(&ev);
-			CORBA_exception_init(&ev);
 		} else {
-			Bonobo_PersistFile_load(f, url, &ev);
+
+			Bonobo_PersistStream_load(ps, s, mime_type, &ev);
+=09
+			if (BONOBO_EX(&ev)) {
+				char *text =3D bonobo_exception_get_text(&ev);
+				fprintf(stderr, "Exception at PersistStream_load: %s\n", text);
+				g_free(text);
+			}=09
 		}
-	} else {
-		Bonobo_Stream s;
-	=09
+	}
+	if (BONOBO_EX(&ev)) {
 		CORBA_exception_free(&ev);
 		CORBA_exception_init(&ev);
 	=09
-		s =3D bonobo_get_object(url, "IDL:Bonobo/Stream:1.0", &ev);
+		f =3D Bonobo_Unknown_queryInterface(bcontrol, "IDL:Bonobo/PersistFile:1.=
0", &ev);
 		if (BONOBO_EX(&ev)) {
 			char *text =3D bonobo_exception_get_text(&ev);
-			printf("Exception at getObject(stream): %s\n", text);
+			printf("Exception at queryInterface(File): %s\n", text);
 			g_free(text);
+		=09
+			control =3D bonobo_widget_new_control(url, CORBA_OBJECT_NIL);
+		=09
 			CORBA_exception_free(&ev);
 			CORBA_exception_init(&ev);
+		} else {
+			Bonobo_PersistFile_load(f, url, &ev);
 		}
-
-		Bonobo_PersistStream_load(ps, s, mime_type, &ev);
-
-		if (BONOBO_EX(&ev)) {
-			char *text =3D bonobo_exception_get_text(&ev);
-			printf("Exception at PersistStream_load: %s\n", text);
-			g_free(text);
-			CORBA_exception_free(&ev);
-			CORBA_exception_init(&ev);
-		}	=09
 	}
=20
 	if (BONOBO_EX(&ev)) {
 		char *text =3D bonobo_exception_get_text(&ev);
 		printf("Exception at load: %s\n", text);

--=-xj9kJ5BWBtjB3dqKnyRg--

--=-tJH9D4mPegIsIYMt6dyx
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQBAe6LQUkVLHK5zOkcRAh1FAKCHk81/bQagaSicLgTtE5Pb4TnjPACfc5XK
ovulY5cSr0jZT9FlWNvJOFc=
=Fia/
-----END PGP SIGNATURE-----

--=-tJH9D4mPegIsIYMt6dyx--