JDK-6598651 : [MAWT] Keyboard stops responding after About dialog open and close in SwingSet2
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2007-08-29
  • Updated: 2011-01-19
  • Resolved: 2008-01-30
Related Reports
Duplicate :  
Description
Initially this bug was entered in NetBeans IssueZilla system as http://www.netbeans.org/issues/show_bug.cgi?id=97249
Keyboard stops responding in any java application with main frame and dialog after following set of steps:

1) Open application (for example SwingSet2 demo, or NetBeans)
2) Invoke some dialog (About dialog in SwingSet2 demo or for example Ctrl+F - find - in NetBeans)
3) Close dialog by Esc or OK

Keyboard is frozen now, nothing works, shortcuts, writing in editor or in text fields, nothing. I tried to debug and find out that key events are just not even coming, I added AWTEventListener(KEY_EVENT_MASK) and no events came when error occurred.

Good news is that bug can be workarounded - to make keyboard working again, some kind of "renewing" AWT hierarchy is needed. In SwingSet2 demo this means to switch L&F. Bug is then gone for good. In NetBeans it's needed to switch maximization by double clicking on document or view tab. In NetBeans the error appear again after repeating steps 2 and 3.

Sadly, this error seems to be reproducible only on some machines and I believe installing Beryl window manager is the key for the error to start occur.

My whole configuration: Linux Ubuntu 7.04 Feisty, default Human Theme, installed Beryl window manager. HW Notebook Sony Vaio VGN-SZ4XN/C, Graphics NVIDIA GeForce Go. Error is reproducible 100% on my machine even if Beryl WM is disabled on default Metacity WM is used. However I believe that Beryl installation changed something that triggers the bug.

I guess you'll have problems to reproduce the error. But I'm experienced developer so I can help you and do some dumps or logging for you if you tell me how and where into JDK code should I put them.

Maybe wild guess, but I think this error may be connected to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6509038 and to the fact that Beryl is non reparenting WM.

And lastly, bug appears on JDK 1.6.0_02 and also JDK 1.7.0, build 1.7.0-ea-b11. On JDK 1.5.0_12 all works OK.

Comments
EVALUATION The problem is fixed as the fix for 6465038. Not reproducible since 6u4.
30-01-2008

EVALUATION not sure if we will fix the problem in Motif-based AWT since we have dropped it in 7.0 and the problem does look like very serious problem.
29-11-2007

EVALUATION I added info in Issuezilla, removing incomplete status for now. In my case, I found that the problem is caused by setting AWT_TOOLKIT=MToolkit.
29-11-2007

EVALUATION have not received any response yet, thus marking the CR as incomplete for now.
01-11-2007

EVALUATION after closer look I found that we do receive key events, but all these events are filtered by XFilterEvent call for some reasons. Also if I uninstall scim (IM engine) I'm unable to reproduce the problem. So, perhaps I'm seeing another problem :( Added comment to the issue in Issuezilla and asked to reproduce the problem with enabled logging to verify if the problem they see has the same cause or not.
25-10-2007

EVALUATION Yes, this is what I expected and found as well - no events being post. I think it has to do something with how Beryl handles windows and that it is non-reparenting WM. I would say that Beryl thinks there is another window active then JDK thinks and events are being sent to another window context, perhaps some dummy one - just a hypothesis, of course.
25-10-2007

EVALUATION according to our logging both java and native focus should be fine (java one is on the right component, native one is on the right proxy). But after some (unknown) point we do not receive any (native) key events :(
24-10-2007

EVALUATION after installing Beryl I was able to reproduce the problem (at least Ihope that this is the same problem :) Note that I have not run Beryl, just install it. Perhaps metacity was patched somehow. Need to investigate the problem.
24-10-2007

EVALUATION According to comments for http://www.netbeans.org/issues/show_bug.cgi?id=97249 it looks like I have to install Beryl to reproduce the problem.
17-09-2007

EVALUATION After reading original issue in Issuzilla I've found that user says that (s)he was able to reproduce the problem with metacity (though the experiment was not very clean) I'm going to ask the submitter of original issue to try to reprduce problem in clean environment w/o Beryl. Before that I'm making this CR P3, because Beryl is not supported WM and there is a "simple" workaround - DO-NOT-USE-BERYL :)
31-08-2007

EVALUATION I couldn't reproduce it on Windows so it looks like an AWT issue key points "Beryl is non reparenting WM" and possible connection with 6509038 reassigned to AWT
30-08-2007