JDK-4376406 : FileChooser unresponsive to user input
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_7
  • CPU: x86
  • Submitted: 2000-10-04
  • Updated: 2001-01-04
  • Resolved: 2001-01-04
Related Reports
Relates :  
Description
Run the Swingset and go to the FileChooser demo.  

Bring up one of the file dialogs.  The display will be unresponsive
to key/mouse presses for 30 seconds or so.  If you keep clicking
the mouse during this time, eventually, when control is restored to the
user, exceptions will be thrown.  Note: this happens with 1.3 and 1.4, too.
It may take a little playing to get it to happen, but most of the
time, it happened immediately for me.

Brent mentioned seeing this on sparc/solaris with Merlin, so it may not 
be specific to x86.

I haven't tested on Windows.  

Here are the exceptions from one run: 

/java/jdk/bin/jdkx -b /net/jano/export/disk03/awt/rray/ladybird/build/solaris-i386 swingset
cd /net/jano/export/disk03/awt/rray/ladybird/build/solaris-i386/demo/jfc/SwingSet2
/net/jano/export/disk03/awt/rray/ladybird/build/solaris-i386/bin/java -cp SwingSet2.jar:. SwingSet2
Exception occurred during event dispatching:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1242)
        at java.awt.Component.getLocationOnScreen(Component.java:1216)
        at javax.swing.JPopupMenu.show(JPopupMenu.java:731)
        at javax.swing.plaf.basic.BasicComboPopup.show(BasicComboPopup.java:123)
        at javax.swing.plaf.basic.BasicComboPopup.togglePopup(BasicComboPopup.java:805)
        at javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mousePressed(BasicComboPopup.java:442)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
        at java.awt.Component.processMouseEvent(Component.java:3712)
        at java.awt.Component.processEvent(Component.java:3544)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2593)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1242)
        at java.awt.Component.getLocationOnScreen(Component.java:1216)
        at javax.swing.JPopupMenu.show(JPopupMenu.java:731)
        at javax.swing.plaf.basic.BasicComboPopup.show(BasicComboPopup.java:123)
        at javax.swing.plaf.basic.BasicComboPopup.togglePopup(BasicComboPopup.java:805)
        at javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mousePressed(BasicComboPopup.java:442)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
        at java.awt.Component.processMouseEvent(Component.java:3712)
        at java.awt.Component.processEvent(Component.java:3544)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2593)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1242)
        at java.awt.Component.getLocationOnScreen(Component.java:1216)
        at javax.swing.JPopupMenu.show(JPopupMenu.java:731)
        at javax.swing.plaf.basic.BasicComboPopup.show(BasicComboPopup.java:123)
        at javax.swing.plaf.basic.BasicComboPopup.togglePopup(BasicComboPopup.java:805)
        at javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mousePressed(BasicComboPopup.java:442)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
        at java.awt.Component.processMouseEvent(Component.java:3712)
        at java.awt.Component.processEvent(Component.java:3544)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2593)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1242)
        at java.awt.Component.getLocationOnScreen(Component.java:1216)
        at javax.swing.JPopupMenu.show(JPopupMenu.java:731)
        at javax.swing.plaf.basic.BasicComboPopup.show(BasicComboPopup.java:123)
        at javax.swing.plaf.basic.BasicComboPopup.togglePopup(BasicComboPopup.java:805)
        at javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mousePressed(BasicComboPopup.java:442)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
        at java.awt.Component.processMouseEvent(Component.java:3712)
        at java.awt.Component.processEvent(Component.java:3544)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2593)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)




Comments
EVALUATION Commit to fix in Merlin. I'll leave it up to Rich whether he wants to do something about this in Ladybird. Apparently, it exists in Kestrel, so it isn't a regression. eric.hawkes@eng 2000-10-04 After reading the bug description more closely, this is a problem with JFileChooser, not FileDialog. I am reassigning to Swing until/unless they can pinpoint the problem on us. michael.martak@Eng 2000-11-21 I was able to reproduce this behavior only with the following setup (actually, you could run the full SwingSet2, but FileChooserDemo is much faster): java -Duser.home=/home/echawkes -cp SwingSet2.jar FileChooserDemo click on 'Show Plain FileChooser'. When the file chooser comes up, try to resize it. At some point, the painting will stop, and the vm will completely lock up. I can't even get a dump at this point. After about 30 seconds, the VM will come back to life and you can get a dump and things will work again. I tried adding a Thread that prints something out every .5 seconds. When the VM locks up, it stops printing anything out, implying that somehow the VM is wedging. scott.violet@eng 2000-11-30 I spoke with James and Ken on this one, and they determined that the wedging is happening because of NFS. Eric has a link to buggle (/net/buggle/export2/echawkes) in his home directory. When FileChooser tries to get the status of this file (stat64 is ultimately used), the VM wedges as the native code is stuck in kernel code which can't be stopped. It appears that while the VM is in this wedged state, the mouse events are still being queued up and will be dispatched to the components when the vm unwedges. This can cause problems as the Components may no longer be valid when the VM unwedges. For example, if you do the sequence (when in this wedged state): click on the cancel button, click on the 'All Files' popup, you will get an exception. This happens because the clicks on the cancel button are dispatched, which cause the Window to close. The click on the popup is then dispatched, even though the button is no longer showing, which causes a problem in Popup as it assumes it will only get MouseEvents when the Popup is showing. We could certainly change the mouse handling code in popup to bail if the button isn't showing, but it would seem that MouseEvents should only be dispatched to components that are showing. I have a feeling that there are numerous other places that assume the component will only receive MouseEvents when the component is showing. As such, I am going to reassign to AWT to evaluate how hard it would be to add this logic in. I am also going to lower the priority as this doesn't happen all that often. scott.violet@eng 2000-11-30 BTW, buggle seems to be gone completely, which is likely the problem. echawkes@gradgrind:/home/echawkes( 148 )% cd buggle buggle: No such file or directory echawkes@gradgrind:/home/echawkes( 149 )% eric.hawkes@eng 2000-11-30 Submitted the RFE 4401639 to track this. The exceptions are the natural, graceful way to fail under these circumstances. michael.martak@Eng 2001-01-03
30-11-2000