United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4530428 JVM crashes when setting PrintService in sun.awt.windows.WPrinterJob
JDK-4530428 : JVM crashes when setting PrintService in sun.awt.windows.WPrinterJob

Details
Type:
Bug
Submit Date:
2001-11-21
Status:
Closed
Updated Date:
2001-11-30
Project Name:
JDK
Resolved Date:
2001-11-30
Component:
client-libs
OS:
windows_nt
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Cannot Reproduce
Affected Versions:
1.4.0
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description

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) 
======================================================================

                                    

Comments
EVALUATION

We have an HP4050TN and an HP5000 here configured on NT 4.0 SP6.
We ran the test program many times against these printers and haven't
seen a single crash.

We need more information from the submitter to help us reproduce this
problem.

###@###.### 2001-11-21
============================

I did a test in Win NT German SP6 using the following drivers:
 HP Laserjet 4100 PCL 6 v 4.3.2.89 build 1153
 HP Laserjet 4050 PCL 5e v 4.3.2.177 bld 1241

I cannot reproduce the problem in both cases.  Please update NT with SP 6, this may be OS related bug.

###@###.### 2001-11-28
======================================

Customer updated to SP6 and more recent drivers and the problem is no
longer reproducible.
###@###.### 2001-11-30
                                     
2001-11-28



Hardware and Software, Engineered to Work Together