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

REG:PrintJobNoMoreEvents not triggered when printing INPUTSTREAM.POSTSCRIPT(w32)

XMLWordPrintable

    • 2d
    • b26
    • x86
    • windows_xp
    • Verified

      I am getting a postscript file printed through INPUT_STREAM.POSTSCRIPT doc flavor to a file by setting the destination attribute. When i add the print job listener to the print job created out of the supported print service, the PrintJobNoMoreEvents method in the listener is not getting called from Tiger - b22. It is getting called in the previous builds such as b21, b20.

      Due to this the regression test - CloseStreamTest.java fails by going into an infinite loop. This test sets a boolean value in all the listener methods and checks it inside a while loop to make sure closeStreams() method call is completed. Since for the above flavor, none of the listener methods are called (except PrintDataTransferComplete) the boolean value is not getting set and hence the test goes into an infinite loop. THIS IS A PIT FAILURE. In the previous build, there was a NPE when getStreamForBytes() returns null and hence this failure is not reproducible.

      This is reproducible only on Win32 platforms and the above test passed on Solaris, becuase on Solaris, PrintJobNoMoreEvents is triggered properly.

      I have attached a sample code. Execute the sample code. If you don't see 'PrintJobNoMoreEvents Triggered' message on the console, the bug is reproduced.

      Please see the bug 4929515. Printing INPUT_STREAM.POSTSCRIPT does not trigger PRINTJOB_COMPLETE event as mentioned in the bug id. It does trigger only PrintDataTransferComplete. Hence one of the listener methods mentioned above must be invoked or the regression test must be altered in such a way that it does not set the boolean causing the infinite loop, inside the listener methods.

            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: