Closed fujiwarat closed 9 years ago
A colleague of mine (zork@chromium.org, please add him to cc:) figured out that there
seems to be a ref-counting issue in the ibus_input_context_process_key_event() function.
It seems that if the connection to ibus-daemon is lost inside the while-loop, the ref
count of the |connection| object immediately drops to zero?
> while (!ibus_pending_call_get_completed (pending)) {
> ibus_connection_read_write_dispatch (connection, -1);
> }
Here is an interim patch for the issue, fyi.
http://git.chromium.org/cgi-bin/gitweb.cgi?p=ibus.git;a=commit;h=20500aae5359580f7c6b8b4b7643a101b3087e5a
Original issue reported on code.google.com by yusukes@chromium.org
on 2010-06-04 01:07:16
Thanks. I will try this patch.
BTW, why ibus related libraries do not have debug symbols?
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-04 02:02:39
It's also worth noting that this loop is trying to emulate a blocking call to dbus
without a timeout. This can cause dbus to drop the connection, which I believe
happens when this loop prevents other dbus messages from getting handled properly.
Original issue reported on code.google.com by zork@chromium.org
on 2010-06-04 02:09:01
> BTW, why ibus related libraries do not have debug symbols?
Ah it's just because non-stripped libraries for debugging were not installed on the
Ubuntu box. Sorry for the inconvenience...
Original issue reported on code.google.com by yusukes@chromium.org
on 2010-06-04 02:37:48
Ibus used g_main_context_iteration before. It has another problem.
Some time, when ibus are waiting for a reply of process_key_event, a new process-key-
event will arrive from main loop. And then the application will receive those replies
in wrong order. So I fixed it with ibus_connection_read_write_dispatch. It could stop
the mainloop, also stop the timeout. :(
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-04 02:59:07
I created a commit to make ibus_input_context_process_key_event in async mode. I think
it could fix the problem. Please test it. Thanks.
http://github.com/phuang/ibus/compare/05ed5f32b4...554e35e6dc
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-04 07:34:16
Thanks! I'm now testing it on Chromium OS.
Original issue reported on code.google.com by yusukes@chromium.org
on 2010-06-04 07:52:34
http://github.com/phuang/ibus/commit/683f8d03ecbf6de5a031fdec3bc89999db857faa
Just updated the branch to set the hardward_keycode in GdkEvent correctly.
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-04 12:20:01
Hi, here are the test results:
1. Ubuntu Lucid x86_64: perfect.
I tested the latest version, 683f8d03ecbf6de5a031fdec3bc89999db857faa, using the 'while
true' script above.
Though gdb occasionally reported SIGPIPE, the im module continued working correctly
even after SIGPIPEs.
2. Chromium OS i386: almost okay. no SIGSEGV.
On Chromium OS, I tested the initial version, 554e35e6dcbee874fbcaebd81b7558ca4ff48d5d.
The patch fixed the SIGSEGV problem, but I experienced another issue on the OS.
Sometimes the backspace key (and arrow and control keys, IIRC) stopped working on a
specific text input area.
I'll try the latest version on Monday.
Thanks!
Original issue reported on code.google.com by yusukes@chromium.org
on 2010-06-05 07:37:46
Thank you for testing. I found the backspace problem too. The latest commit could fix
it on my box.
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-05 08:04:31
I've just confirmed that the latest version works fine on Chromium OS too.
Thanks a lot for your quick work!
Original issue reported on code.google.com by yusukes@chromium.org
on 2010-06-07 05:42:46
Thanks.
Original issue reported on code.google.com by Shawn.P.Huang
on 2010-06-07 06:46:03
Original issue reported on code.google.com by
yusukes@chromium.org
on 2010-06-04 01:01:19