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

JVM crashes when setting PrintService in sun.awt.windows.WPrinterJob

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.4.0
    • client-libs
    • 2d
    • x86
    • windows_nt



      Name: rmT116609 Date: 11/21/2001


      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

      Setting PrintService in PrinterJob running on Windows NT crashes JVM using
      printers from Kyocera, HP, Lexmark and some others. Especially HP 4000 series
      is problematic, but also HP 8000, Ricoh Aficio 1600, Lexmark Optra T614

      You can reproduce it running the following class:

      import java.awt.print.PrinterJob;
      import java.awt.print.PrinterException;
      import javax.print.*;

      public class PrinterTest
      {

        public PrinterTest()
        {
        }

        public static void main(String[] args)
        {
          PrinterJob pj = PrinterJob.getPrinterJob();
          PrintService[] pslist = PrintServiceLookup.lookupPrintServices(null,null);
          PrintService ps = null;
          ps = pslist[0];
            try
            {
              System.err.println("printing on " + pj.getPrintService().getName());
              pj.setPrintService(ps);
            }
            catch (PrinterException pe)
            {
              pe.printStackTrace(System.err);
            }
      /* }
          else
            System.err.println("printer not found");
      */
        }
      }

      Sometimes the JVM crashes, giving the following message:


      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D0819B2
      Function=Java_sun_awt_windows_WPrinterJob_setNativePrintService+0x190
      Library=C:\Programme\Java\j2re1.4.0-beta3\bin\awt.dll

      Current Java thread:
      at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
      at sun.awt.windows.WPrinterJob.setPrintService(WPrinterJob.java:387)
      at PrinterTest.main(PrinterTest.java:32)

      Dynamic libraries:
      0x00400000 - 0x00406000 C:\WINNT40\system32\java.exe
      0x77F70000 - 0x77FCE000 C:\WINNT40\System32\ntdll.dll
      0x77DC0000 - 0x77DFF000 C:\WINNT40\system32\ADVAPI32.dll
      0x77F00000 - 0x77F62000 C:\WINNT40\system32\KERNEL32.dll
      0x77E70000 - 0x77EC4000 C:\WINNT40\system32\USER32.dll
      0x77ED0000 - 0x77EFC000 C:\WINNT40\system32\GDI32.dll
      0x77E10000 - 0x77E67000 C:\WINNT40\system32\RPCRT4.dll
      0x78000000 - 0x78044000 C:\WINNT40\system32\MSVCRT.dll
      0x6D330000 - 0x6D441000 C:\Programme\Java\j2re1.4.0-beta3
      \bin\client\jvm.dll
      0x77FD0000 - 0x77FFB000 C:\WINNT40\system32\WINMM.dll
      0x6BC00000 - 0x6BC11000 C:\WINNT40\system32\SMNT40.dll
      0x69F00000 - 0x69FBA000 C:\WINNT40\system32\adisynth.dll
      0x6D1D0000 - 0x6D1D7000 C:\Programme\Java\j2re1.4.0-beta3\bin\hpi.dll
      0x6D300000 - 0x6D30D000 C:\Programme\Java\j2re1.4.0-beta3\bin\verify.dll
      0x6D210000 - 0x6D227000 C:\Programme\Java\j2re1.4.0-beta3\bin\java.dll
      0x6D320000 - 0x6D32D000 C:\Programme\Java\j2re1.4.0-beta3\bin\zip.dll
      0x6D000000 - 0x6D0F6000 C:\Programme\Java\j2re1.4.0-beta3\bin\awt.dll
      0x73060000 - 0x73078000 C:\WINNT40\system32\WINSPOOL.DRV
      0x76AD0000 - 0x76AD5000 C:\WINNT40\system32\IMM32.dll
      0x77B80000 - 0x77C35000 C:\WINNT40\system32\ole32.dll
      0x0B030000 - 0x0B045000 D:\jbuilder5\bin\jbWheel.dll
      0x76AE0000 - 0x76AFD000 C:\WINNT40\system32\imagehlp.dll
      0x71DC0000 - 0x71DCA000 C:\WINNT40\system32\PSAPI.DLL

      Local Time = Tue Nov 20 11:43:32 2001
      Elapsed Time = 7
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Client VM (1.4.0-beta3-b84 mixed mode)
      #
      (Review ID: 135965)
      ======================================================================

            jgodinez Jennifer Godinez (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: