[g-a-devel]Re: at-spi segfaulting



Michael and Mark,

I'm not a wizzard like you both at debugging this sort of thing, but here's what I was able to figure out which isn't all that helpful:

We register a callback in the registry with ORBIT_SMALL_LISTEN_BROKEN. When the test program is interrupted, our callback is called in the registry as it should be. At that point, the obj pointer is still valid, but obj->connection is NULL. Presumeably, ORBIT_try_connection may have been called which seems to unref the connection and NUL obj->connection if the connection is broken.

\In the orbit_small_listen_broken callback, we call spi_desktop_remove_application which attempts to remove the application object from the desktop object. In the process of doing so, it calls ORBIT_small_unlisten_broken. But, because obj->connection is NULL, this call does nothing and returns ORBIT_CONNECTION_BROKEN-- the g_signal_disconnect_ function in ORBIT_small_unlisten_broken isn't called. So subsequently our listen_broken callback gets called a second time, which is when messy things happen...

The only obvious and most likely not probable possibility that comes to mind is that when the connection is unrefed and the obj->connection pointer is NULLed, the refcount isn't 0 so the connection object stays around and can still generate signals when bonobo_object_unref is called...

Marc

At 10:33 AM 2/21/2002 +0000, Michael Meeks wrote:
Hi Marc,

On Thu, 2002-02-21 at 09:15, Marc Mulcahy wrote:
> At line 139 of registryd/desktop.c, there is a check:
>
> g_return_if_fail (SPI_IS_DESKTOP(app->desktop));
>
> This normally just prints a warning and returns as expected, but
> occasionally segfaults.  The debugger doesn't give many useful hints, it
> traces into BONOBO_TYPE_FUNC_FULL, but doesn't reveal much after that.

It should never print a warning, that looks like we're getting a double
emission of the 'broken' signal on that connection which sounds broken.

> Not sure why app->desktop isn't a desktop, but in the first place...

        It's been freed, I imagine, add a memset (app, 0xaa, sizeof
(Application)); in spi_desktop_remove_application before the free - we
should have one for future debugging ease.

        So - somehow the listen/unlisten is not working correctly which is
annoying, possibly an ORB issue; hmm.

        Regards,

                Michael.

--
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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