Issue 1186 in ibus: ibus-1.3.99: ibus-ui-gtk dies very often

2 views
Skip to first unread message

ib...@googlecode.com

unread,
Jan 16, 2011, 10:15:07 AM1/16/11
to ibus-...@googlegroups.com
Status: New
Owner: ----
CC: yus...@chromium.org, daiki.u...@gmail.com, Shawn.P....@gmail.com
Labels: Type-Defect Priority-Medium Component-ibus

New issue 1186 by yus...@chromium.org: ibus-1.3.99: ibus-ui-gtk dies very
often
http://code.google.com/p/ibus/issues/detail?id=1186

After the recent signal-sender patch
(https://github.com/ibus/ibus/commit/d5bdf851d25b07062ecb2ea932b91317b1d9e72a),
it seems that the Gtk+ panel component for IBus became unstable. I'm not
sure whether the patch is doing something wrong, or the patch just revealed
an existing bug in ibus-daemon (probably the latter?), but anyway after the
patch ibus-daemon occasionally terminates a GDBus connection between the
daemon and ibus-ui-gtk unexpectedly, and as a result, the UI component
process suddenly quits.

There seems to be several ways to reproduce the problem, but the easiest
way I found so far would be as follows:

-------------------------------------
1. build tot ibus (master branch), then install it
2. start ibus-daemon without any command line options
3. start ibus-setup. remove all engines except pinyin. check the "Share the
same input method among all applications." checkbox
4. quit ibus-setup, then quit ibus-daemon
5. start ibus-daemon with --panel=disable
6. start /usr/lib/ibus/ibus-ui-gtk
7. *before pressing any hot-keys of ibus*, run the
attached 'ibus_ui_gtk_crash_reduction' command. (you can compile it
with 'g++ `pkg-config --libs --cflags ibus-1.0`
ibus_ui_gtk_crash_reduction.c -o ibus_ui_gtk_crash_reduction')

expected:
/usr/lib/ibus/ibus-ui-gtk does not quit.

actual:
the process quits.
-------------------------------------

Reverting the patch for ibusimpl.c
(http://codereview.appspot.com/3775042/diff/3001/bus/ibusimpl.c) seems to
fix the problem. i.e. the patches against dbusimpl.c and inputcontext.c
would be fine.


What version of the product are you using? On what operating system?
OS (Linux distributions, UNIX or ...): Ubuntu 10.10
Architecture (i386, x86_64): x86_64
IBus version: 1.3.99 (tot as of Jan 15 2011)
Input method name and version: ibus-pinyin tot
Python version: 2.6.6-5ubuntu1
dbus version: GDBus 2.26.0-0ubuntu1
dbus-python version: 0.83.0-1ubuntu3
gtk version (if bug is about gtk applications): 2.22.0-0ubuntu1
qt version (if bug is about qt applications): -

Attachments:
ibus_ui_gtk_crash_reduction.c 346 bytes

ib...@googlecode.com

unread,
Jan 16, 2011, 11:34:53 AM1/16/11
to ibus-...@googlegroups.com

Comment #1 on issue 1186 by Shawn.P....@gmail.com: ibus-1.3.99: ibus-ui-gtk

Looks like below may have problem.

@@ -419,7 +419,7 @@ bus_dbus_impl_get_name_owner (BusDBusImpl
*dbus,
if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 ||
g_strcmp0 (name, "org.freedesktop.IBus") == 0) {
- name_owner = "org.freedesktop.DBus";
+ name_owner = name;
}
else {

ib...@googlecode.com

unread,
Jan 16, 2011, 11:47:01 AM1/16/11
to ibus-...@googlegroups.com

Comment #2 on issue 1186 by yus...@chromium.org: ibus-1.3.99: ibus-ui-gtk

o really? My observation is somewhat different. The patch for dbusimpl.c
(name_owner = name;) didn't trigger the problem in my environment, but the
patch for ibusimpl.c at
http://codereview.appspot.com/3775042/diff/3001/bus/ibusimpl.c, which
changes interface and sender from DBus to IBus, did trigger it.

This is just a guess, but dispatching the GlobalEngineChanged signal to the
panel process, which is generated in the step 7 above, may somehow trigger
the problem? Since ibus-ui-gtk calls org.freedesktop.DBus.AddMatch
with "type='signal', sender='org.freedesktop.IBus',
path='/org/freedesktop/IBus'", after the ibusimpl.c patch, I think
ibus-daemon has started to dispatch GlobalEngineChanged (and
RegistryChanged) signals to the panel process.


ib...@googlecode.com

unread,
Jan 16, 2011, 11:31:06 PM1/16/11
to ibus-...@googlegroups.com

Comment #3 on issue 1186 by daiki.u...@gmail.com: ibus-1.3.99: ibus-ui-gtk

Sorry for inconvenience, and thanks for the investigation.

After further debugging, the crash is in libdbus (ibus-ui-gtk uses it via
dbus-python) while validating the message serial > 0.
Until the sender/interface change, that had never been a problem since
ibus-ui-gtk had never receive any signals.

I just filed the fix as:
http://codereview.appspot.com/4050041/

ib...@googlecode.com

unread,
Jan 17, 2011, 1:17:50 AM1/17/11
to ibus-...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 1186 by yus...@chromium.org: ibus-1.3.99: ibus-ui-gtk

Thanks for the fix! I've confirmed that your change fixed the problem.
Closing.

https://github.com/ibus/ibus/commit/6a5c7666e1194e8ac8a3d0c3f680269b42fe80c2

Reply all
Reply to author
Forward
0 new messages