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

FX print tests fail with NPE in some environments

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: openjfx11
    • Component/s: javafx
    • Labels:
      None

      Description

      On some systems without a printer, the FX printing unit tests can fail with an NPE. Given where the exception is, it is unlikely to be a problem in the tset.

      Here are the errors:

      est.javafx.print.JobSettingsTest > dummyTest FAILED
          java.lang.NullPointerException
              at javafx.graphics/com.sun.prism.j2d.print.J2DPrinter.getMediaSizeName(J2DPrinter.java:832)
              at javafx.graphics/com.sun.prism.j2d.print.J2DPrinter.printableArea(J2DPrinter.java:848)
              at javafx.graphics/javafx.print.Printer.createPageLayout(Printer.java:250)
              at javafx.graphics/javafx.print.Printer.getDefaultPageLayout(Printer.java:222)
              at javafx.graphics/javafx.print.JobSettings.pageLayoutProperty(JobSettings.java:1113)
              at javafx.graphics/javafx.print.JobSettings.getPageLayout(JobSettings.java:1149)
              at javafx.graphics/javafx.print.JobSettings.toString(JobSettings.java:1175)
              at java.base/java.lang.String.valueOf(String.java:2788)
              at javafx.graphics/javafx.print.PrinterJob.toString(PrinterJob.java:562)
              at java.base/java.lang.String.valueOf(String.java:2788)
              at test.javafx.print.JobSettingsTest.setUp(JobSettingsTest.java:57)

      test.javafx.print.JobSettingsTest > testCopiesSettings FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPrintSides FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPaper FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPaperSource FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPageRangeSettings FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPrintColorSettings FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPrintResolutions FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testPageOrientation FAILED
          java.lang.NullPointerException

      test.javafx.print.JobSettingsTest > testCollationSettings FAILED
          java.lang.NullPointerExceptiontest.javafx.stage.ShowAndWaitTest > testTimelinePrint[0] FAILED
          java.lang.NullPointerException

      test.javafx.stage.ShowAndWaitTest > testTimelinePrint[1] FAILED
          java.lang.NullPointerException

      test.javafx.stage.ShowAndWaitTest > testTimelinePrint[2] FAILED
          java.lang.NullPointerException


      test.javafx.print.PrinterJobTest > testPrinter FAILED
          java.lang.NullPointerException

      test.javafx.print.PrinterJobTest > dummyTest FAILED
          java.lang.NullPointerException

      test.javafx.print.PrinterJobTest > testPrinterProperty FAILED
          java.lang.NullPointerException

      test.javafx.stage.ShowAndWaitTest > testTimelinePrint[0] FAILED
          java.lang.NullPointerException

      test.javafx.stage.ShowAndWaitTest > testTimelinePrint[1] FAILED
          java.lang.NullPointerException

      test.javafx.stage.ShowAndWaitTest > testTimelinePrint[2] FAILED
          java.lang.NullPointerException

        Attachments

          Activity

            People

            • Assignee:
              lbourges Laurent Bourg├Ęs
              Reporter:
              kcr Kevin Rushforth
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: