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

NullPointerException printing a VolatileImage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      rc1
    • CPU:
      sparc
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      Customer email:
      ===============
      I just built a small application and ran it against the latest build I could find (b80) of Merlin. The application Printtest.zip is attached to bug report.

      Although the code works (except for the problem with the print orientation I mentioned) with 1.3, it crashes when I try to run it with 1.4. It dies when I attempt to print (I have included the dump below). Again, this same code does not crash when run against 1.3.


      java.lang.NullPointerException
      at sun.awt.windows.WPathGraphics.hasTransparentPixels(WPathGraphics.java:1345)
      at sun.awt.windows.WPathGraphics.drawImageToGDI(WPathGraphics.java:1178)
      at sun.awt.windows.WPathGraphics.drawImage(WPathGraphics.java:753)
      at sun.awt.windows.WPathGraphics.drawImage(WPathGraphics.java:668)
      at sun.awt.windows.WPathGraphics.drawImage(WPathGraphics.java:607)
      at sun.awt.windows.WPathGraphics.drawImage(WPathGraphics.java:550)
      at sun.awt.windows.WPathGraphics.drawImage(WPathGraphics.java:459)
      at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4759)
      at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4702)
      at javax.swing.JComponent.paint(JComponent.java:793)
      at printtester.SwingPrinter.print(SwingPrinter.java:68)
      at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1494)
      at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1065)
      at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:966)
      at printtester.PrintRunnable.printAll(PrintRunnable.java:131)
      at printtester.PrintRunnable.printContainer(PrintRunnable.java:153)
      at printtester.PrintRunnable.run(PrintRunnable.java:100)
      at java.lang.Thread.run(Thread.java:539)


      To simulate the problem:

      Untar and uncompress the attachment. Set the path to JDK 1.4 Beta 2 distribution and then go into Projects directory and execute "java printtester/PrintTestApp1". Select the "Print Aw"t button under File menu. And select the Landscape option from the Page layout and "print to a file" option. One will see the above stacktrace immediately.

      Verified with jdk build 1.4.0-rc-b89 on solaris 2.8, no exception occured when print to a file in landscape mode.

        Attachments

          Activity

            People

            Assignee:
            prr Philip Race
            Reporter:
            skvasude Sujeet Vasudevan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: