Re: Activation problems



A Qua, 2003-07-30 às 21:43, Seth Nickell escreveu:
> OK, so MonikerContext is not a straight-up BonoboObject but a
> BonoboForeignObject. I have no idea what this is... *but* there's

  This makes no sense at all. MonikerContext should *not* be a
BonoboForeignObject. Are you sure about this?  BonoboForeignObject has
been created only to serve language bindings (python in particular), and
should not be used by C programs.  That's why it's not even documented
O:-)

> special casing for BONOBO_TYPE_FOREIGN_OBJECT in bonobo-object.c that
> prevents calling the function that assigns something to the corba_objref
> member variable. Amusingly enough, in bonobo-foreign-object.c we find
> the following block of code:
> 
>           /* The following type check is deactivated because
>            * CORBA_Object_is_a doesn't seem to work correctly,
>            * considering that it returns TRUE only if the object is
>            * exactly of type Bonobo::Unknown, and FALSE if it is of a
>            * derived type, while the CORBA spec says it should return
>            * TRUE in both cases.  Perhaps there is a bug in ORBit?.. */

  Yes, I wrote that comment.  I promised Michael I'd look into this, but
ORBit2 is very complex, and I eventually got bored. :P
  At the moment I'm very busy at work (deadline); I can't work on that. 
Maybe later...

> #if 0
>         CORBA_exception_init (&ev);
>         if (!CORBA_Object_is_a (corba_objref, "IDL:Bonobo/Unknown:1.0",
> &ev)) {
>                 if (ev._major != CORBA_NO_EXCEPTION)
>                         g_warning ("CORBA_Object_is_a: %s",
>                                    bonobo_exception_get_text (&ev));
>                 else
>                         g_warning ("bonobo_foreign_object_new:
> corba_objref"
>                                    " doesn't have interface
> Bonobo::Unknown");
>                 CORBA_exception_free (&ev);
>                 return NULL;
>         }
>         CORBA_exception_free (&ev);
> #endif
> 
> -Seth
> 
> On Wed, 2003-07-30 at 13:35, Seth Nickell wrote:
> > On Wed, 2003-07-30 at 10:31, Michael Meeks wrote:
> > > 	For the benefit of anyone reading the archives / with similar problems;
> > > the IDL was not correctly inheriting from Bonobo/Unknown - whereas
> > > Bonobo/Unknown assumes that in it's vepv construction. Thus the vpev
> > > pointed at one thing, and the code at another; such that the vepvcache
> > > wasn't built correctly for that instance, and whacked out things
> > > happened in-proc when invoking a method.
> > > 
> > > 	I've added a test for this to libbonobo, unconditionally enabled with
> > > it's configured with --enable-debug=yes.
> > > 
> > > 	An easy mistake to make; next time it'll be an easier one to catch I
> > > hope :-)
> > 
> > I *knew* I'd done something wrong, its one of the things I do best. :-)
> > 
> > #ifdef G_ENABLE_DEBUG
> > 	if (!CORBA_Object_is_a (BONOBO_OBJREF (object),
> > 				"IDL:Bonobo/Unknown:1.0", NULL))
> > 		g_error ("Attempt to instantiate non-Bonobo/Unknown "
> > 			 "derived object via. BonoboObject");
> > #endif
> > 
> > So right now this causes failures in programs that initialize Bonobo,
> > which is a bad thing... The problem is (as you said) creating the
> > MonikerContext object. It looks like what is happening is that
> > object->corba_objref is NULL, which is of course causing
> > CORBA_Object_is_a to harf when BONOBO_OBJREF consequently returns NULL.
> > Is this happening too soon (i.e. before all the corba stuff is connected
> > together) or is something unusual about the monikercontext object? I
> > don't know enough about Bonobo internals etc to really be able to push
> > farther I think.
> > 
> > -Seth
> > 
> > _______________________________________________
> > gnome-components-list mailing list
> > gnome-components-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-components-list
> 
> _______________________________________________
> gnome-components-list mailing list
> gnome-components-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-components-list
-- 
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





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