Comment 11 for bug 820274

Revision history for this message
Alberto Mardegan (mardy) wrote : Re: [panel] Window title switch to arial font after using Synaptic

Ok, I finally found a way to reproduce this reliably. I noticed that installation and removal of certain packages (p.e., ekiga) always caused this problem. The reason is that the installation of ekiga (and other packages) triggers the gconf post-install script, which amon other things sends a HUP signal to gconf. To keep it short, the way to reproduce this issue is just executing the following line in a terminal:

kill -s HUP `pidof gconfd-2`

This causes gconfd to reload its configuration, and to advertise the DB under a new D-Bus object path. Existing GConfClient instances are not notified of the change in object path, and therefore all the APIs invoked through them simply fail. In Unity2d, we never cache the GConfClient instance (which is properly obtained with gconf_client_get_default() and unref'ed every time we retrieve a value), so the problem is in the libgconf2 itself.

Possible ways to solve it (in libgconf2):

- Make GConfClient track the DB object path changes, and readjust its internal structures consequently. This is the proper solution, but it might involve changing gconfd as well and add a D-Bus signal from it.

- gconf_client_get_default(), on the first invocation, creates a new GObject *and* references it; therefore, this object is never destroyed. A possible solution is to change g_object_ref() into a g_object_weak_ref(), so the GConfClient is properly destroyed when no client is using it.