Red Hat Bugzilla – Bug 735472
NullPointerException at XWindowPeer.restoreTransientFor() using a JOptionPane
Last modified: 2011-09-06 11:27:49 EDT
Created attachment 521270 [details]
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):
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
Exception occurred during event dispatching:
The Option Pane must close without errors
Reverting to java-1.6.0-openjdk.x86_64 184.108.40.206-220.127.116.11.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 ***