Submitted On 18-JAN-2007
I found if we disable input method with enableInputMethods(false) , the component will respond key event when lock occur, just like JPasswordField does. But we need input method in our program.
Is there any other way to workaround? Please give me some suggestion, thanks!
Submitted On 23-JAN-2007
this problem is really troublesome
Submitted On 26-JAN-2007
If you can't reproduce it, try to switch language of your Linux desktop to Simplified Chinese, and run the test program again.
Submitted On 06-FEB-2007
I have experieneced something similar while running with JEdit and Netbeans where I'll switch to a different program then switch back and then can not enter in anything into the text editors for either program. The workaround I've been using it to find any text area or JTable where I can select and enter in text, then I'll cancel what I was doing and things seem to reset back so I can use the text editors (until it happens again).
Submitted On 21-FEB-2007
Noticed that this also happens on FC6 and in desktop applications. Killing all SCIM processes fixes the problem. bug 6299259 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6299259) seems to be the same problem.
Submitted On 24-FEB-2007
seems this is one bug of libx11.
http://lists.debian.org/debian-x/2006/12/msg00699.html
http://bugs.winehq.org/show_bug.cgi?id=6547
Submitted On 28-FEB-2007
I encounter this problem too. wish it will be fix soon.
Submitted On 01-MAR-2007
it seems that SUN Java got some threading problem.
i traced the program above using gdb, one thread calls XCreateIC to create Input Context for the "OK" button of the pop'd up dialog:
(gdb) thread
[Current thread is 2 (Thread -1480590416 (LWP 23959))]
#0 0xa7f7034e in XCreateIC () from /usr/X11R6/lib/libX11.so.6
#1 0xa8638a98 in Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint
()
from /usr/java/jdk1.5.0_04/jre/lib/i386/xawt/libmawt.so
#2 0xa8639349 in Java_sun_awt_X11_XInputMethod_createXICNative ()
from /usr/java/jdk1.5.0_04/jre/lib/i386/xawt/libmawt.so
#3 0xb290243b in ?? ()
#4 0xa806a96c in ?? ()
#5 0xa7af42ec in ?? ()
#6 0x01400031 in ?? ()
#7 0x00000000 in ?? ()
while another thread is sitting there to process the incoming XEvent:
(gdb) thread
[Current thread is 4 (Thread -1475978320 (LWP 23957))]
#0 0xa81eef5a in XFilterEvent () from /usr/X11R6/lib/libX11.so.6
#1 0xa82a736a in Java_sun_awt_X11_XlibWrapper_XFilterEvent ()
from /usr/java/jdk1.5.0_04/jre/lib/i386/xawt/libmawt.so
#2 0xb290243b in ?? ()
#3 0x0828c96c in ?? ()
#4 0xa8064e8c in ?? ()
#5 0x08233470 in ?? ()
#6 0x00000000 in ?? ()
libX11 is not thread-safe, which means you cannot call most libX11 library function in different thread.
here is what happened, under normal condition, if user press the keyboard, following actions will be taken step by step:
1. keylock program take XEvent from the event queue, then call XFilterEvent() to progress the incoming key events, then send XIM_FORWARD_EVENT to XIM Server (e.g. SCIM) for it to decide whether to handle it or not.
2. if SCIM is in English mode, then it will send the event back to keylock by sending XIM_FORWARD_EVENT back, then sitting there wait until keylock returns XIM_SYNC_REPLY (this is the behavior of the default synchoronous input mode), if some new key events is forwarded later, SCIM will simply queue them until XIM_SYNC_REPLY is received.
3. keylock get the keyboard XIM_FORWARD_EVENT event sent back by SCIM, it knows SCIM wants it to handle that itself, so the corresponding IC (Input Context) will be set as FABRICATED (misspelled as FABLICATED in libX11), and it's also marked as MARK_NEED_SYNC_REPLY since the real key event is not processed yet, so it cannot return SYNC_REPLY to SCIM yet. in the end, a new key event is created and put back on the _head_ of event queue.
4. the key event put back in step 3 is accepted in the next call of XFilterEvent(), since the IC is already in the FABRICATED mode, it will send MARK_NEED_SYNC_REPLY to SCIM so that SCIM will be released to process its event queue (not X Event queue).
OK, if this is not confusing enough, here is what happened if a second thread sneaking in:
imagine after step 3, another thread is waken up to create some new IC (like the "OK" button of pop'd up dialog). the newly created IC will register itself a new handler for the XIM events, which will "steal" the key event created by step3. so in step 4, the new IC will take over to process that key event, however since it is not marked as FABRICATED, it will not send MARK_NEED_SYNC_REPLY to SCIM, it will just forward the key event to SCIM instead. while SCIM is sadly sitting there waiting for SYNC_REPLY that will never comes, and the new IC is miserably sitting there waiting for FORWARD_EVENT that never comes. so the keyboard seems dead.
I tried IBM java 1.5.0 (a.k.a IBM Java 2 v5.0), it does not suffer such kind of problem. so it seems to be SUN Java specific bug.
this problem can be workaround by turning off the synchronous mode of XIM, though there must be some kind of side-effect that I don't know.
Submitted On 16-MAR-2007
yes,I 'm crazy with my JEdit with this bug
Submitted On 26-MAR-2007
How to turn off the synchronous mode of XIM?
Submitted On 05-APR-2007
Has any progress been made on this problem? Is there a workaround?
Submitted On 21-APR-2007
I WANT THIS BUG TO BE FIXED!!!!
Submitted On 21-APR-2007
This bug didn't occur in opensolaris b61 when running in CDE 1.7 on a Xsun Xserver.
Submitted On 21-APR-2007
BEA Jrockit JDK6 also has this bug....
good new to you guys....but news to our linux user....
there's only one JVM that i didn't try...
IBM JDK...
Submitted On 13-JUN-2007
This bugs appears under Ubuntu and the jdk6 included in its repositories (version 6-00-2ubuntu2 ) 1.6.0-b105.
However, the jdk5 (also, the one included in its repositories) doesn't have this bug.
I hope it get's fixed soon, because using jdk5 means a poor GTK L&F for linux users
Submitted On 14-AUG-2007
kmwang
>>This may be a platform issue (cf. >>http://bugs.freedesktop.org/show_bug.cgi?id=7869). The description in the >>'comment' section is very similar the investigation on freedesktop.org one.
>>Posted Date : 2007-08-14 20:13:08.0
http://bugs.freedesktop.org/show_bug.cgi?id=7869 seems not the reason.
see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6568693, this is very seem to this bug.
Submitted On 06-DEC-2007
paul.x
I'm a Java developer. I would like to use features of modern IDEs like IntelliJ IDEA or NetBeans. However, currently I'm forced to use Eclipse. Is any progress on this bug??
Submitted On 18-DEC-2007
I am having this issue on Ubuntu 7.10 and it is driving me crazy!! Please fix this issue, and I will be greatly appreciated!!
Submitted On 11-JAN-2008
paulie.x
It seems that java maintainers have a lot of work on other major issues, probably something like support of new native look in windows vista.
This is HANDICAP !!!
Submitted On 20-JAN-2008
v.tst
this bug doesn't happen if you disable your compiz. but still it should be somehow fixed.
Submitted On 20-JAN-2008
paulie.x
v.tst : who told you i'm using compiz
yes, it happens without compiz!
Submitted On 25-JAN-2008
v.tst
in my case without compiz it doesn't happen, so it is just my observation...
Submitted On 25-JAN-2008
JonesLeon
Why can not fix it over a year!
Submitted On 27-JAN-2008
paul.x
Hello, maybe I found some "solution", but I really don't know what I'm doing and I haven't tested it more deeply yet.
Here is the procedure that caused keyboard lock in NetBeans 6.0.
1. Go to netbeans installation directory
2. $ bin/netbeans
3. Try to move in editor with cursor keys (it should work)
4. Press Ctrl-Shift-O, "Open Project" dialog appears, press escape to return
Now I cannot use the keyboard.
So I tried:
$ export AWT_TOOLKIT=XToolkit
and repeated above procedure. The keyboard responded :D.
Then I tried:
$ export AWT_TOOLKIT=MToolkit
and repeated above procedure. Keyboard lock occured again.
I have Ubuntu 7.10, Java JRE 1.6.0_03 and I also uninstalled all scim packages.
Submitted On 27-JAN-2008
paul.x
DAMN!
I found
AWT_TOOLKIT=MToolkit
in /etc/enviroment
When I first tried Compiz I had some problems with Java apps, so in some forum I found that setting this variable will solve it.
So I deleted it and it's ok so far.
Submitted On 29-JAN-2008
v.tst
oh, great :)
as i remember i set the variable
AWT_TOOLKIT=MToolkit
in order to conciliate compiz and swing applications... so, now it works without and no problems with locking.
thnks
Submitted On 12-FEB-2008
IanLewis
Setting AWT_TOOLKIT=MToolkit does not seem to work. It actually seems to be worse. It is reproduceable by closing a window with escape.
Setting AWT_TOOLKIT=XToolkit seems to make it a little less severe but it still happens when window switching.
Submitted On 06-JAN-2009
bwagnermpower
Our company was harmed by this bug today. Why isn't this critical issue being addressed? This problem involves a core service layer and has been open for over 2 years. We had the same symptoms; Swing ceases receiving key events on our RHEL server. This broke a critical admin utility for which we had to work around. I found this bug ID, compiled the example given in the bug description, and was able to reproduce the exact same symptoms that we experienced (key events no longer received by Swing). We know it is the same issue because it breaks all key events, including the directional keys that interact with our JTables, for example. Since this involves AWT for a specific JRE distribution, PLEASE elevate the priority of this bug. Our server specs:
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Linux 2.6.18-92.1.6.el5 #1 SMP Fri Jun 20 02:36:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Gnome 2.16.0
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)
Submitted On 19-JAN-2009
vj_roba
How long does it take to fix this bug!?
It made my software useless on Linux.
I really want it to be fixed.
Submitted On 19-JAN-2009
vj_roba
I hope people in Sun understand that this bug makes all Swing/AWT applications useless on Linux in non English country.
Submitted On 04-JUN-2009
alepe.com
I uninstalled scim and installed uim and the problem gone so far.
Submitted On 05-SEP-2009
Tri.Bao
I found a workaround:
Assume on the form, you have a JPasswordField and a button (a form must have at least one button :-) ). Then add a FocusLister into the JPasswordField field. In the focusGained, do the following:
- Fire a mouse_PRESS (press, not click) event to the button
- request the focus back to the JPasswordFied
(of course, we have to make sure no infinity calls to the focusGained, just simply use a boolean flag)
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|