It seems imsettings sometimes failed to run ibus-daemon with timeout when I change the login languages (maybe user-dirs-update-gtk effects). Having a timeout option for imsettings-start might be good. The default timeout would be 2.5 sec. The test case works good with me: --- imsettings-0.108.1/imsettings/imsettings-request.c.orig +++ imsettings-0.108.1/imsettings/imsettings-request.c @@ -29,6 +29,11 @@ #include <glib/gi18n-lib.h> #include <dbus/dbus-glib-lowlevel.h> #include <dbus/dbus-glib-bindings.h> + +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif + #include "imsettings-request.h" #include "imsettings.h" #include "imsettings-utils.h" @@ -236,10 +241,19 @@ imsettings_request_get_version(IMSetting g_return_val_if_fail (IMSETTINGS_IS_REQUEST (imsettings), 0); priv = IMSETTINGS_REQUEST_GET_PRIVATE (imsettings); +#if 0 if (!dbus_g_proxy_call(priv->proxy, "GetVersion", &err, G_TYPE_INVALID, G_TYPE_UINT, &retval, G_TYPE_INVALID)) +#else + if (!dbus_g_proxy_call_with_timeout (priv->proxy, "GetVersion", + 60000, + &err, + G_TYPE_INVALID, + G_TYPE_UINT, &retval, + G_TYPE_INVALID)) +#endif g_warning(_("Failed to invoke a method `%s' on %s:\n %s"), "GetVersion", dbus_g_proxy_get_interface(priv->proxy), @@ -317,7 +331,11 @@ imsettings_request_get_info_object(IMSet IMSettingsInfo *retval = NULL; GValueArray *ret = NULL; GError *err = NULL; +#ifdef HAVE_LOCALE_H const gchar *locale = setlocale(LC_CTYPE, NULL); +#else + const gchar *locale = NULL; +#endif g_return_val_if_fail (IMSETTINGS_IS_REQUEST (imsettings), NULL);
The GError of dbus_g_proxy_call() via imsettings_request_get_version(): {domain = 73, code = 4, message = 0x927990 "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection w"...}
(In reply to comment #0) > The default timeout would be 2.5 sec. s/2.5 sec/25 sec/
How to reproduce this? since it relies on DBus on the request and the response, I'm just wondering if other DBus services also works without any problems.
To speak strictly, this bug needed the fix of bug 530711 for me. The original patch updates the gconf value when the language is changed and it causes the performance of ibus-daemon and the this timeout problem is happened. But after I discussed the patch with upstream, we agreed not to update gconf if the preload list is the language base. So probably I won't encounter this problem. Closing this at the moment.