Export to GitHub

ibus - issue #1770

Keyboard input for Java app is blocked when IBus is active


Posted on Apr 8, 2015 by Happy Dog

OS: Ubuntu 14.04 LTS Architecture: x86_64 IBus version: 1.5.5 Input method name and version: - Python version: 2.7.6 dbus version: 1.6.18 dbus-python version: 1.2.0

Using JDK 1.7.

What steps will reproduce the problem? 1. java KeyLock 2. keep pressing Alt+N to navigate to last page, then keep pressing Alt+B to go back to the first, and repeat this sequence until no more input is accepted (it takes me ~100 steps).

The attached sample code comes from https://bugs.openjdk.java.net/browse/JDK-6506617. That bug also has some useful debugging breadcrumbs, both Java and native stacktraces, etc.

What is the expected output? What do you see instead? At some point the app will stop receiving keyboard input -- you can still click around, but Alt+N and Alt+B will not work anymore.

Please provide any additional information below. This is affecting a lot of IntelliJ users, see https://youtrack.jetbrains.com/issue/IDEA-78860, although I've seen reports of similar problems in Netbeans and other Java apps (https://netbeans.org/bugzilla/show_bug.cgi?id=224866, etc).

I couldn't reproduce the problem by using IBUS_ENABLE_SYNC_MODE=1. Is it possible these IDEs need additional synchronization between Xlib and IBus, because they're more likely to introduce delays in handling of keypress events? Maybe https://code.google.com/p/ibus/issues/detail?id=1697 is related.

Any pointers on how to debug this further when it happens would be appreciated, because we run into this frequently. Thank you.

Attachments

Comment #1

Posted on Apr 10, 2015 by Massive Giraffe

Your problem is no longer reproduced in the latest ibus.

Comment #2

Posted on Apr 10, 2015 by Massive Giraffe

Sorry, it's my mistake. I can reproduce your problem. X11 changes the coming the key events but I don't know why.

Comment #3

Posted on Apr 10, 2015 by Happy Dog

Thanks for looking into this!

If you can reproduce the problem, can you confirm any of the following (in both cases I can no longer reproduce the hang, but I'd like a second opinion):

  1. Using IBUS_ENABLE_SYNC_MODE=1 we don't run into the same problem.
  2. Using JDK8 we don't run into the same problem.

The reason I'm asking is there have been some changes in JDK8 around AWT modality and event handling, and if using JDK8 solves the problem, the bug is no longer that important in the long run (official JDK7 support ends April 2015 anyway).

Comment #4

Posted on Apr 13, 2015 by Massive Giraffe
  1. Using IBUS_ENABLE_SYNC_MODE=1 we don't run into the same problem.

Right.

  1. Using JDK8 we don't run into the same problem.

I use openjdk 1.8.0.40 and still reproduce the problem in Fedora.

Status: Duplicate

Labels:
Type-Defect Priority-Medium