JDK-6573191 : PIT : ApplicationExcludeDialogTest throws java.lang.NullPoiinterException : null pData
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-06-24
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b17Fixed
Related Reports
Relates :  
Description
ApplicationExcludeDialogTest.java test is an automated test which is throwing java.lang.NullPoiinterException : null pData exception. This test fails only in jdk7_b15 pit build , pass in jdk1.6.0 & jdk1.7.0 till b13 & i even the test pass in jdk1.7.0 b14 pit also. The test fails only in windows.

Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
        at sun.awt.windows.WWindowPeer.modalDisable(Native Method)
        at sun.awt.windows.WWindowPeer.setModalBlocked(WWindowPeer.java:314)
        at java.awt.Window.setModalBlocked(Window.java:1356)
        at java.awt.Dialog.blockWindow(Dialog.java:1563)
        at java.awt.Dialog.modalShow(Dialog.java:1430)
        at java.awt.Dialog.conditionalShow(Dialog.java:929)
        at java.awt.Dialog.show(Dialog.java:1058)
        at java.awt.Component.show(Component.java:1421)
        at java.awt.Component.setVisible(Component.java:1374)
        at java.awt.Window.setVisible(Window.java:870)
        at java.awt.Dialog.setVisible(Dialog.java:1008)
        at sun.awt.windows.WPrinterJob.pageDialog(WPrinterJob.java:415)
        at ApplicationExcludeDialogTest$CustomDialog.doOpenAction(ApplicationExcludeDialogTest.java:228)
        at TestDialog.actionPerformed(TestDialog.java:108)
        at java.awt.Button.processActionEvent(Button.java:410)
        at java.awt.Button.processEvent(Button.java:378)
        at java.awt.Component.dispatchEventImpl(Component.java:4420)
        at java.awt.Component.dispatchEvent(Component.java:4250)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$1.run(Dialog.java:1069)
        at java.awt.Dialog$3.run(Dialog.java:1123)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1121)
        at java.awt.Component.show(Component.java:1421)
        at java.awt.Component.setVisible(Component.java:1374)
        at java.awt.Window.setVisible(Window.java:870)
        at java.awt.Dialog.setVisible(Dialog.java:1008)
        at ApplicationExcludeDialogTest$CustomWindow.doOpenAction(ApplicationExcludeDialogTest.java:241)
        at TestWindow.actionPerformed(TestWindow.java:94)
        at java.awt.Button.processActionEvent(Button.java:410)
        at java.awt.Button.processEvent(Button.java:378)
        at java.awt.Component.dispatchEventImpl(Component.java:4420)
        at java.awt.Component.dispatchEvent(Component.java:4250)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)




Step to reproduce:
------------------
1) Compile all the attached files.
2) Run java -Dresults ApplicationExcludeDialogTest
Observe that exception is throw on the console.

Comments
EVALUATION After the fix for 6503472, some code in AwtWindow was refactored, in particular, _ModalDisable method. Before the fix we just checked if a window has PDATA and silently return if it hasn't, while after the fix an exception is thrown. Note, there is another related issue: 6278099 - which is about native windows dialogs, they can't be modal blocked. This occurs right because of the statement above: if a window has no PDATA associated (like all the native dialogs), _ModalDisable method does nothing.
25-06-2007