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

Printing from multiple threads throws incorrect exception on Linux-AMD64

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • client-libs
    • 2d
    • x86
    • linux_redhat_4.0

      I am trying to print a GIF image from 2 different threads using DocPrintJob. When I run this on RHEL4-AMD64, I am getting an exception when printing from the second thread. The exception keep changings when running multiple times successively. However, the 2 exceptions given below are the ones that alternate. One of the exceptions claims that flavor is unsupported. But flavor is indeed supported -

      java.lang.NullPointerException
      at sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:841)
      at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
      at MultiThreadTest.print(MultiThreadTest.java:32)
      at MultiThreadTest.run(MultiThreadTest.java:41)

      sun.print.PrintJobFlavorException: invalid flavor
      at sun.print.UnixPrintJob.print(UnixPrintJob.java:313)
      at MultiThreadTest.print(MultiThreadTest.java:32)
      at MultiThreadTest.run(MultiThreadTest.java:41)

      This is reproducible on Mustang as well as Tiger-FCS. I reproduced it with Mustang-n73, b59g on RHEL4-AMD64. This does not happen when I use linux-i586 build and occurs only on linux-amd64 build.

      I have attached a sample test and an image. Run the test passing the image file as an argument to the test. You will see the exception on the console. If it does not happen the first time, try running the test 2-3 times successively and you will see that exception when printer becomes busy.

            jgodinez Jennifer Godinez (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: