Client crash on second indicate_server_show

Bug #351537 reported by Eitan Isaacson
12
Affects Status Importance Assigned to Milestone
Indicator Applet
Fix Released
High
Ted Gould

Bug Description

After calling show(), hide(), and then show again, the client will crash.

Related branches

Revision history for this message
Eitan Isaacson (eeejay) wrote :
Ted Gould (ted)
Changed in indicator-applet:
assignee: nobody → ted-gould
importance: Undecided → High
milestone: none → 0.1.5
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote :

Hi,

The issue here is that the gobject is not unregistered from dbus.

Once you register it it will be unregistered when the last unref of the
dbus connection is done. However, while hide() unrefs the connection,
it is not guaranteed to be the last to do so, so the object is left registered.
Trying to register again causes a fatal error as there is already an object
registered at the path.

It is possible to cause an unregister, and I tried doing this from hide(),
but this causes a segfault on the next show. I suspect this is because
there is a FIXME in the dbus-glib code in the unregister callback, and the
callback does nothing. I suspect this leaves the bus in an inconsistent
state, leading to the crash. I haven't confirmed that this is the case, or
tried to work out whether it was my fault.

Another option is to not unregister the object on hide(), and then only
register it on show() if there was no previous show(). However, this
leaves the hide() ineffectual it seems, with the server still showing
up in the indicator.

Perhaps you have a fix in mind, but I wanted to share my insights from
trying to debug this.

Thanks,

James

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 351537] Re: Client crash on second indicate_server_show

On Sat, 2009-04-04 at 18:43 +0000, James Westby wrote:
> Another option is to not unregister the object on hide(), and then only
> register it on show() if there was no previous show(). However, this
> leaves the hide() ineffectual it seems, with the server still showing
> up in the indicator.

James,

Thanks for the investigation! This is what I was thinking about doing,
glad to know it won't work ;)

So, I think for Jaunty we should make hide just send the hide signal,
but not remove the object from the bus. This isn't perfect, but most of
the clients today listen for the hide signal, so they'll effectively
disappear and not check for the object disappearing as well.

Not prefect, but we'll have to look at fixing DBus for the next
release :)

 Thanks,
  Ted

Ted Gould (ted)
Changed in indicator-applet:
status: Confirmed → Fix Committed
Ted Gould (ted)
Changed in indicator-applet:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.