I first noticed with Xfce 4.8 that the xfce4-panel migrate tool would segfault trying to migrate the default config. This is caused by Xfconf not properly handling the PropertyNotFound dbus error it gets when a property is referenced for the first time. See fix bellow: diff --git a/xfconf/xfconf-cache.c b/xfconf/xfconf-cache.c index 36bd03e..975237a 100644 --- a/xfconf/xfconf-cache.c +++ b/xfconf/xfconf-cache.c @@ -752,9 +752,9 @@ xfconf_cache_set(XfconfCache *cache, } if(G_UNLIKELY(!dbus_error_name - || strncmp(dbus_error_name, "org.xfce.Xfconf.Error.", 22) - || (strcmp(dbus_error_name+22, "PropertyNotFound") - && strcmp(dbus_error_name+22, "ChannelNotFound")))) + || strncmp(dbus_error_name, "org.xfce.Xfconf.Error.", 22) == 0 + || (strcmp(dbus_error_name+22, "PropertyNotFound") == 0 + || strcmp(dbus_error_name+22, "ChannelNotFound") == 0))) { /* this is bad... */ g_propagate_error(error, tmp_error); This patch allows the xfce4-panel migration helper to do its job successfully and now my panel is working fine.
Created attachment 4369 Change check Does this work fine as well?
No but this does: diff --git a/xfconf/xfconf-cache.c b/xfconf/xfconf-cache.c index 36bd03e..7f011a7 100644 --- a/xfconf/xfconf-cache.c +++ b/xfconf/xfconf-cache.c @@ -751,10 +751,8 @@ xfconf_cache_set(XfconfCache *cache, dbus_error_name = dbus_g_error_get_name(tmp_error); } - if(G_UNLIKELY(!dbus_error_name - || strncmp(dbus_error_name, "org.xfce.Xfconf.Error.", 22) - || (strcmp(dbus_error_name+22, "PropertyNotFound") - && strcmp(dbus_error_name+22, "ChannelNotFound")))) + if(g_strcmp0(dbus_error_name, "org.xfce.Xfconf.Error.PropertyNotFound") == 0 + || g_strcmp0(dbus_error_name, "org.xfce.Xfconf.Error.ChannelNotFound") == 0) { /* this is bad... */ g_propagate_error(error, tmp_error);
Then that is not the problem, because PropertyNotFound/ChannelNotFound is expected to happen.
I'm mistaken. It's actually the change to ChannelNotFound which is making things work.
Which panel version do you use?
The version I'm using is straight from git, but as I said above I've seen this same failure with versions as far back as 4.8.
Hi Andrew, Nick. I'm not quite sure what is the status of this bug, and whether the patch is still valid and/or relevant. Could you please comment on the report? Thanks.
Please open a new bugreport if the problem is still present.