Ubuntu

iBus blocks input in Java application

Reported by Piranha on 2009-11-13
162
This bug affects 35 people
Affects Status Importance Assigned to Milestone
Iced Tea
Confirmed
Medium
ibus
Unknown
Unknown
ibus (Ubuntu)
Undecided
Unassigned
Nominated for Karmic by Funto
Nominated for Lucid by aalhadsaraf
icedtea-java7 (Ubuntu)
Undecided
Unassigned
Nominated for Karmic by Funto
Nominated for Lucid by aalhadsaraf

Bug Description

Binary package hint: ibus

This is a very unfortunate bug, as it is hard to reproduce :(.

I use ThinkingRock, a Java application, and after some time the keyboard input stops working for this application, meaning I can still use my mouse to manipulate the program, but I cannot type anything. When closing the iBus Daemon the input works again after some seconds. Also restarting the Java application helps to postpone the problem until it occurs again some minutes later.

I'm using Ubuntu 9.10 with version 1.2.0.20090927-2ubuntu2 of iBus and version 2.2.1 of ThinkingRock. My Java version is 6-15-1.

Please notice: I do NOT want to input Chinese or Japanese or anything like it. I just want to normally use my keyboard. I also have NO input method selected, I have the input methods turned OFF.

I have yet to test this behavior with other Java applications (maybe it's a bug in ThinkingRock?), so I'd be happy if somebody can confirm this bug for other Java applications. Because the solution is to quit the iBus Daemon, I suspect iBus to be the problem.

Piranha (beni-urgent) on 2009-11-13
description: updated

I'm assuming this is related to ibus. Occasionally JOSM stops accepting any keyboard input when ibus is running (I had the same problem with some kde apps before installing ibus-tq). If I restart ibus daemon, JOSM crashes if I try to type anything into it.

64-bit Fedora 12, I'll attached the log.

Created attachment 273
Crash log

Felix Kaminsky (felixkaminsky) wrote :

I can reproduce the bug using freemind version 0.9 RC 6.

Pretty ugly when editing a mindmap.

Felix Kaminsky (felixkaminsky) wrote :

@ Piranha: thx killing ibus seems to work for the time being.

@ maintainers: The "pretty ugly" wasn't meant in an offensive way. But I consider it serious productivity bug.

Rolf Leggewie (r0lf) wrote :

How long does it take until you can't type anymore? FWIW, works fine for me so far. I can even type Japanese in freemind.

Piranha (beni-urgent) wrote :

Can take several hours. I don't know if it has any connection with how long you focus the window or type in an application.

Also remember: It does not seem to have anything to do with actually using various input methods. Just typing normally with no input methods activated results in this bug. Typing Japanese works perfectly, but that's not the problem.

Funto (funto66) wrote :

Got exactly the same problem, with FreeMind as well as its fork FreePlane (Java programs).
This problem also happens when using a Qt program, namely Qt Creator in my case, though the problem generally comes after I type "Ctrl+F" (find and replace). This also can also happen in temporary windows Qt Creator creates.
Example : I hit "New class", then a dialog box appears, the keyboard does not work anymore, then I close this dialog box, reopen it and then it works.

I have had these problems since I configured IBus for being able to type in Japanese, but as Piranha says, it does not seem to have anything to do with using various input methods, as input methods are turned OFF when the bug appears.

Hope this will be corrected before next version of Ubuntu...

HonestMistake (dj-ubntl) wrote :

Just wanted to add a "me too": It happens always when I work with JOSM, a Java program for editing OpenStreetMap data.
After some time I can't type any text into the dialog boxes anymore. I can't identify a trigger for this error, sometimes it occurs after 1 minute, sometimes it works for half an hour.

As in the other cases described before, the problem occurs while I have turned off Anthy and use standard input only.

After the error occurs I quit ibus, and after about 3 seconds text input works fine again.

Do I understand correctly that the app crashes only on ibus daemon restart?

You are probably right about this being an ibus issue. This might be related:
http://code.google.com/p/ibus/issues/detail?id=593

With a fix posted late Nov/09 and ibus making fairly frequent releases, there's a good chance that this fix has made it into F12 by now. Is this still happening for you?

larmahunter (charrah) wrote :

This bug affects all my Java programs that use Slick, a game library, for input. On the Slick forums they say it's the same thing even with SCIM, so perhaps there is some underlying problem with how input methods are handled. Lately I haven't even been able to end the iBus process, but that's probably unrelated.

larmahunter (charrah) wrote :

Further details for myself... In Slick programs the input doesn't work from the beginning. Turning off iBus while the program is running freezes it to the point where the JVM can't terminate it. Running them while iBus is not makes input work perfectly.

Peng Huang (shawn-p-huang) wrote :

Please try the latest ibus from my personal ppa. For some detail information, please read http://code.google.com/p/ibus/wiki/ReadMe

larmahunter (charrah) wrote :

Thanks Peng, using your PPA actually fixes this completely! I was a bit surprised, cause I had thought that it was an underlying problem somewhere else.

The crash-on-ibus-restart bug has been fixed upstream:
http://hg.openjdk.java.net/jdk7/swing/jdk/rev/bbadb9484f53

Dan Quade (danquade) wrote :

Minecraft is another good example where input does not work.
http://www.minecraft.net/play.jsp

Dan Quade (danquade) wrote :

Also, Peng's PPA is pretty useless now since there are no Maverick builds.

larmahunter (charrah) wrote :

Yeah I neglected to mention that it worked one time by coincidence then never again, so that's alright.

dreamon (dreamon) wrote :

I have the same problem in Netbeans and a vocabulary programme called JMemorize. It seems to be triggered when a dialogue box is opened, such as the box to search for text when you press CTRL + F. Hope this info helps somehow.

Piranha (beni-urgent) wrote :

I can confirm this. In my Java applications the bug usually occurred when a dialog box was opened. I didn't realize that first, but now that dreamon mentioned it, I remembered.

Dan Quade (danquade) wrote :

So Peng made the Maverick builds recently. I've tried them (from both his PPAs) and still no luck. Looks like we are stuck with this problem forever, because I doubt anyone will bother to fix it for so few people.

Dan Quade (danquade) wrote :
dreamon (dreamon) wrote :

In my experience Java programmes also crash very often when iBus is enabled, potentially causing severe data loss. There seems to be a certain incompatibility between iBus and Java -- both Sun Java and OpenJDK. Hope the Peng can look into this.

@unimatrix: This workaround only terminates the iBus daemon when a Java application is launched, doesn't it? We still have the problem of not being able to work with iBus in Java applications, e.g. when you need to enter text in a language that requires an input method framework.

Dan Quade (danquade) wrote :

@dreamon: Correct. That is why it is called a -workaround-, not a fix.

Dan Quade (danquade) wrote :

Another piece of information. I believe this bug only appears on 64-bit systems. Can somebody confirm or deny this?

dreamon (dreamon) wrote :

@unimatrix: Unfortunately this is not confined to 64-bit systems. I get this bug on two different 32-bit systems.

I met the same problem with 64bits maverick and 64bits Java from Oracle. The app I use is ArgoUML.

Sergei Medvedev (smedvedeff) wrote :

I have the same problem with OmegaT 2.2.3 on Ubuntu 10.04.

wanding zhou (zhouwanding) wrote :

same problem with using Cytoscape and Freeplane on ubuntu 10.04

Cale Gibbard (cgibbard) wrote :

I have the same problem with all Java apps not accepting keyboard input, particularly minecraft. Perhaps similarly, keyboard input in flash applications on the web is also flaky/broken for me when the ibus daemon is running (noticed this with UStream chat and many games).

This problem started on upgrading to Ubuntu 10.10 and didn't exist in 10.04 for me.

Michael Speth (conzar) wrote :

I also have this problem with most java applications specifically JMonkeyEngine related Apps.

Changed in ibus (Ubuntu):
status: New → Confirmed

Does this patch need backporting?

Qianqian Fang (fangq) wrote :

Having this problem on matlab GUI (written in Java) for years, see a few similar reports at ibus' bug tracker

http://code.google.com/p/ibus/issues/detail?id=419

appreciated if someone can look into a fix.

PowerKiKi (adrien-crivelli) wrote :

Same problem on a fresh Ubuntu 11.10 using gnome 2 and ibus. I meant to use ibus to type Korean but didn't get to set it up yet, so there is no input methode selected. When I have ibus daemon running Netbeans "loses" the keyboard. As soon as I quit ibus (right-click on the top-right icon -> quit), Netbeans "find" the keyboard back, without even restarting.

Marius B. Kotsbak (mariusko) wrote :

Strange. I had these symptoms without having the "ibus" package installed.

Marius B. Kotsbak (mariusko) wrote :

See also similar bug #925653.

Changed in icedtea:
importance: Unknown → Medium
status: Unknown → Confirmed
nomnex (nomnex) wrote :

If it provides any help, or information, you can read my bug report and the workaround: https://bugzilla.redhat.com/show_bug.cgi?id=800736. In my case, removing the ibus icon from the panel prevents losing keyboard input in Freemind.

nomnex (nomnex) wrote :

forget my previous comment. After a few hours respite, I lose keyboard input in the Freemind window...

xeo (thomas-pototschnig) wrote :

I'm using ibus on Kubuntu 11.10 (64Bit) and I also can reproduce this behaviour. In my case, everytime I pressed CTRL+F in the eclipse IDE the keyboard stopped working for this application. Sometimes kate didn't allow keyboard-input in a file open or file save dialogue.

The "XMODIFIERS=" workaround works fine.

Marius B. Kotsbak (mariusko) wrote :

Has anyone seen this bug in Ubuntu Precise (12.04) or newer? It is supposed to be fixed in upstream java.

Changed in icedtea-java7 (Ubuntu):
status: New → Incomplete
Changed in ibus (Ubuntu):
status: Confirmed → Incomplete
Jorge Gustavo (jgr) wrote :

When I change to ibus, to write chinese characters, the JOSM (JAVA OpenStreetMap) editor does not let me introduce accented characters like 'Rua Cristóvão Colombo'. I can only write non-accented characters. If I disable ibus, I can write accented characters in JAVA applications.

Tobias (tobias-olsson) wrote :

I can confirm this for sun java 1.6.0_43-b01. I have to keep hammering keys and it's not easy to reproduce except when I least want it.

Killing ibus doesn't help, because the problem persist as long as ibus is running (it starts itself up again). Running the following simple script lets me type in the application again.

If the java application is closed and started again, the application accepts keyevents until at a random time it stops again.

I've debugged the application (it's my own app) and I can see no Events being handled for keys, so either it's lowlevel, or it's in ibus.

Running 12.10, but please note that I'm running HotSpot JVM, ie Oracle's binary distribution of java that isn't really modern when it comes to X11. If someone cares about this bug enough to investigate, I can try it on icedtea as well.

Tobias (tobias-olsson) wrote :

script was
while true; do killall ibus-daemon; done

Marius B. Kotsbak (mariusko) wrote :

Tobias, Sun/Oracle Java is no longer included in Ubuntu (but you could try the latest version, or 1.7.x). Please use OpenJDK instead, and reopen this bug report if you can reproduce it there.

Changed in ibus (Ubuntu):
status: Incomplete → Invalid
Changed in icedtea-java7 (Ubuntu):
status: Incomplete → Invalid
Eero Aaltonen (ejn) wrote :

Keyboard input stops working on java applications in Ubuntu 13.10.
$ java -version
java version "1.7.0_51"

So to confirm this I need to kill ibus?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.