Created attachment 521270 [details] Test Case Description of problem: When a JOptionPane option (Yes/No) is first selected from a JOptionPane child of a JFrame that is not the first JFrame created in the VM, a NullPointerException is thrown at sun.awt.X11.XWindowPeer.restoreTransientFor(XWindowPeer.java:1681) Version-Release number of selected component (if applicable): java-1.6.0-openjdk.x86_64 1.6.0.0-59.1.10.3.fc15 How reproducible: Always Steps to Reproduce: 1. Start the test case application, a Window opens 2. Press the button "Option Pane", an Option Pane opens 3. Press Yes or No, The window closes without errors 4. Press the secondary button, a new JFrame opens titled Secondary 5. On that Secondary JFrame, press the button "Option Pane" 6. Select Yes or No 7. An Exception is shown on the console Actual results: Exception occurred during event dispatching: java.lang.NullPointerException at sun.awt.X11.XWindowPeer.restoreTransientFor(XWindowPeer.java:1681) at sun.awt.X11.XWindowPeer.removeFromTransientFors(XWindowPeer.java:1747) at sun.awt.X11.XWindowPeer.setModalBlocked(XWindowPeer.java:1469) at sun.awt.X11.XWindowPeer.setModalBlocked(XWindowPeer.java:1440) at java.awt.Window.setModalBlocked(Window.java:1359) at java.awt.Dialog.unblockWindow(Dialog.java:1597) at java.awt.Dialog.modalHide(Dialog.java:1483) at java.awt.Dialog.hideAndDisposePreHandler(Dialog.java:1215) at java.awt.Dialog.hide(Dialog.java:1255) at java.awt.Component.show(Component.java:1553) at java.awt.Component.setVisible(Component.java:1503) at java.awt.Window.setVisible(Window.java:881) at java.awt.Dialog.setVisible(Dialog.java:1011) at javax.swing.JOptionPane$3.propertyChange(JOptionPane.java:1021) ... Expected results: The Option Pane must close without errors Additional info: Reverting to java-1.6.0-openjdk.x86_64 1.6.0.0-57.1.10.1.fc15 the problem does not happen, the current release fixes bug # 711900 that is related to wrong behavior with model windows, probably the fix introduces this regression since JOptionPane is model too Test Case attached
Modal, not model :-( I am not sure RH people could talk about official Java test suite for licensing issues, but my personal opinion is that it must not have many tests related to AWT/Swing just checking those two bugs I have reported. What can we do to improve this, I do not see tests on icedtea either (probably I am unable to find them but exist). What is the best course of actions to add some tests, do OpenJDK accept tests outside the TCK?
Hi, thanks for reporting and the test case! A bug has already been filed for this and it is fixed upstream. It will be in the next java-1.6.0-openjdk update. *** This bug has been marked as a duplicate of bug 730015 ***