Skip to main content

Dialogue disappears when combo box dropped down.

9 replies [Last post]
geofftitmuss
Offline
Joined: 2007-01-15

Java Plug-in 1.6.0_10-ea
Using JRE version 1.6.0_10-ea Java HotSpot(TM) Client VM
Bug report.

I have a large java applet. This contains some JDialog's with JCombo's on them.
Under this release, **somtimes** when dropping down the combo box, the JDialog disappears. The Combo list is dropped down. On selecting from the combo list, the JDialog reappears.

This is really odd, and unusable.

I have not seen this behaviour under previous releases.

There is no trap information in the console?

HELP!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16

What operating system and web browser?

Do you have a test case we can look at?

Does this only happen in the context of applets, or does it happen for standalone applications as well?

A bug related to Windows event dispatching within the Java Plug-In, 6647406, was recently fixed, but this fix will not be available for a couple of weeks (in build 12).

geofftitmuss
Offline
Joined: 2007-01-15

Operating system - Windows Vista
Browsers - both Firefox and IE7
Only happens when running as applet. Running in Eclipse seems fine. (Although problem is not 100% reproduceable in browsers).
I noticed this problem just after Christmas, but forgot to pursue. Then I had the same symptoms, but did get a stack trace. See http://forum.java.sun.com/thread.jspa?forumID=57&threadID=5251394.

Test case:
In browser,
1. go to www.j2e.com
2. click for 'blank page' (third round white button on right column).
3. use the zig zag (first blue tool on horizontal tool bar), to add a rectangle.
4. select the rectangle you have created.
5. click on the 'animate' button, towards the bottom of the right hand toolbar.
6. Select the right hand combo, to choose an animation effect.

At this point, sometimes the combo list appears, and the animate dialogue vanishes, until a selection is made in the combo.

You may have to repeat several times, and click around a bit.

(New info, in trying this to write out the test case, the swing event thread appears to have deadlocked).

geofftitmuss
Offline
Joined: 2007-01-15

In trying my test case this morning, I have not reproduced the problem. But I have hung the swing thread. Looks like it might sometimes deadlock, and sometimes make windows vanish?

rogyeu
Offline
Joined: 2006-07-30

I can reproduce your issue with the applet hangs. I have created a CR for this issue. Bug ID: 6659071. It will take a day or two before it shows in the bugs.sun.com.

Thanks for reporting the issue.

Regards,
Roger Y.

kbr
Offline
Joined: 2003-06-16

I've looked into this bug and there are two separate issues. One is the disappearance of the dialog while the combo box is selected. While this does occur much more frequently with the new Java Plug-In, it is also reproducible with the old Java Plug-In. I found it occurred most frequently when another application's window mostly obscured the dialog, and then the focus was transferred back into the dialog by clicking on the combo box.

The second issue is the hang of the applet. This is a bug in the applet and not in the Java Plug-In. I don't have an explanation for why it seems to occur only with the new Java Plug-In and not the old one, but the deadlock is obviously in the application and there is nothing we can do about it in the Java Plug-In. Here is an excerpt from the thread dump, obtained using the jstack tool from the JDK. The implicit deadlock is between the animate.Appear thread and the AWT EventQueue thread for the applet.

2008-02-04 18:09:53
Full thread dump Java HotSpot(TM) Client VM (11.0-b09 mixed mode):

"animate.Bounce" prio=4 tid=0x0c8a2400 nid=0x10e8 waiting on condition [0x0cb4f000..0x0cb4fc14]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at animate.Bounce.run(Bounce.java:94)
at java.lang.Thread.run(Thread.java:619)

"animate.Appear" prio=4 tid=0x0b3e8c00 nid=0x1298 in Object.wait() [0x0c40f000..0x0c40fd94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:992)
- locked <0x029e3ac0> (a java.awt.EventQueue$1AWTInvocationLock)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323)
at genericUI.Panel.setListData(Panel.java:546)
at animate.DialogueAnimate.update(DialogueAnimate.java:155)
at genericUI.Panel.selectionChanged(Panel.java:796)
at just2easy.Selection.selectionChanged(Selection.java:1023)
- locked <0x030c98c8> (a java.util.ArrayList)
at animate.Animate.done(Animate.java:338)
at animate.Appear.run(Appear.java:99)
at java.lang.Thread.run(Thread.java:619)

"AWT-EventQueue-2" prio=4 tid=0x0b2d8c00 nid=0x11b8 waiting for monitor entry [0x0c19f000..0x0c19fa14]
java.lang.Thread.State: BLOCKED (on object monitor)
at just2easy.Selection.selectionChanged(Selection.java:1022)
- waiting to lock <0x030c98c8> (a java.util.ArrayList)
at just2easy.View.updateTools(View.java:852)
- locked <0x030be3c8> (a just2easy.View)
at animate.DialogueAnimate.create(DialogueAnimate.java:291)
at animate.DialogueAnimate.handCraftedCode(DialogueAnimate.java:241)
at genericUI.Form.handCraftedCode(Form.java:101)
at genericUI.Form.action(Form.java:85)
at genericUI.Form.actionPerformed(Form.java:210)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1242)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:569)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:605)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:816)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6100)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)
at java.awt.Component.processEvent(Component.java:5865)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4472)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4302)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4302)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

geofftitmuss
Offline
Joined: 2007-01-15

Thanks for looking into this.

I have seen the dialogue disappearing when the combo is dropped again this morning. I feel that this odd behaviour really needs fixing. Or at least understand why it occurs more under that latest plugin. (I had not seen it previously).

Sorry about the applet hanging problem. I will go away, look at my threads, and sort this out.

geofftitmuss
Offline
Joined: 2007-01-15

I have updated the applet and it no longer hangs.

kbr
Offline
Joined: 2003-06-16

Thanks for the prompt fix. I've re-tested with your current applet and the problem with the dialog box disappearing while the combo box is active is no longer reproducible. I think this was a side-effect of the application bug. I've closed 6659071 as "Not a Defect".

geofftitmuss
Offline
Joined: 2007-01-15

I have seen the problem with the dialog box disappearing while the combo box is active again this morning. So there is still a problem. It does seem less easy to reproduce though.