Bug 629872 - imsettings sometimes failed to run ibus
Summary: imsettings sometimes failed to run ibus
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: imsettings
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-03 07:29 UTC by fujiwara
Modified: 2010-12-09 07:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-09 07:55:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description fujiwara 2010-09-03 07:29:23 UTC
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);

Comment 1 fujiwara 2010-09-03 07:36:49 UTC
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"...}

Comment 2 fujiwara 2010-09-03 07:49:54 UTC
(In reply to comment #0)
> The default timeout would be 2.5 sec.

s/2.5 sec/25 sec/

Comment 3 Akira TAGOH 2010-09-15 04:34:24 UTC
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.

Comment 4 fujiwara 2010-12-09 07:55:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.