Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6813208

pageDialog throws NPE from applet

XMLWordPrintable

    • b02
    • x86
    • windows_vista
    • Verified

        The customer reports a problem with the following code.

        aPrinterJob = java.awt.print.PrinterJob.getPrinterJob();
        aPrinterJob.pageDialog(new PageFormat());

        They submitted a testcase of a small applet to reproduce the problem. The testcase is attached.

        But the exception does not come all the time. You may have to reload the applet and click again on the OK button to see the exception in the java console. A dialog with an OK button will appear. When you click on the OK button, the following exception appears 3 time in the java console.

        Exception occurred during event dispatching:

        java.lang.NullPointerException: null pData
        at sun.awt.windows.WComponentPeer._requestFocus(Native Method)
        at sun.awt.windows.WComponentPeer.requestFocus(Unknown Source)
        at java.awt.Component.requestFocusHelper(Unknown Source)
        at java.awt.Component.requestFocusHelper(Unknown Source)
        at java.awt.Component.requestFocus(Unknown Source)
        at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.Dialog$1.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

        This looked similar to CR 6707276, which was reported as no longer reproducible using 6u12 b03 nightly build. I asked the customer to use 6u12 b04. They were able to see the problem with 6u12 b04. The issue is reproducible on Windows XP SP2 and Windows Vista SP1.

        The customer is not satisfied with the work-around of disabling plugin2, due to the large number of users and systems using this applet. They requested this bug be fixed.

              miroslawzn Miroslaw Niemiec (Inactive)
              tstatt Terry Statt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: