Re: The bug hunt continues: Bug found!



Elliot Lee wrote:

> On Fri, 3 Dec 1999, Dietmar Maurer wrote:
>
> > Just found the bug (I think so). Take a look at bonobo-skel.c line 5588:
>
> > // This is the bug !?
> > if(ev->_major == CORBA_NO_EXCEPTION) CORBA_Object_release(_ORBIT_retval, ev);
>
> > Why does it release the ORBIT_retval?
>
> Because when you return a value, you are giving up ownership of it to the
> caller.
>
> > It works if you remove that line.
>
> Someone probably forgot to do CORBA_Object_duplicate() in the gnome-bonobo
> get_ui_handler implementation.

Tanks for that hint. It is in

impl_get_toplevel (PortableServer_Servant servant,
     CORBA_Environment *ev)

we need to change

 if (uih->top_level_uih == CORBA_OBJECT_NIL)
  return gnome_object_corba_objref (GNOME_OBJECT (uih));

into

 if (uih->top_level_uih == CORBA_OBJECT_NIL)
  return CORBA_Object_duplicate(gnome_object_corba_objref (GNOME_OBJECT
(uih)),ev);


is that OK?




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