JDK-4697214 : REGRESSION: Print to HP DeskJet 1600CM crashes VM on NT4.0 and JRE 1.4.0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0,1.4.1_01,1.4.1_02
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_98,windows_nt,windows_2000
  • CPU: x86
  • Submitted: 2002-06-04
  • Updated: 2003-07-03
  • Resolved: 2002-09-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.1_05 05Fixed 1.4.2Fixed
Related Reports
Duplicate :  
Description

Name: jk109818			Date: 06/04/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :
Windows NT Version 4.0
Service Pack 6

A DESCRIPTION OF THE PROBLEM :
Printing to a HP DeskJet 1600CM causes the JRE 1.4.0 VM to
crash (tried it on several Windows NT 4.0 SP6 hosts) while
JRE 1.3.1 does not crash. The crash does not occur on
Windows 2000 and XP, only NT.

The driver that I use is available from the HP website.
Start from
http://welcome.hp.com/country/us/eng/software_drivers.htm
and select model '1600CM'. Then select Windows NT 4.0 and
two drivers are available for download :
1998-06-15 dj169en.exe 1.25mb (A)
1996-12-03 dj250en.exe 0.34mb (B)

The problem only occurs with driver (A) and NOT with driver
(B). Note that JRE 1.3.1 works with both drivers without
problems.


REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Calling Toolkit.getDefaultToolkit().getPrintJob
(frame,title,jobAttributes,pageAttributes);
is enough to crash the VM.


EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected :
to get a PrintJob object

Actual:
VM crash


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D081C73
Function=Java_sun_awt_windows_WPrinterJob_setNativePrintService+0x190
Library=R:\java\jre\bin\awt.dll

Current Java thread:
        at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
        at sun.awt.windows.WPrinterJob.setPrintService(Unknown Source)
        at com.eurotronics.orbitx.uif.printsystem.printservice.PrinterJobManager
.createPrinterJob(PrinterJobManager.java:77)
        at com.eurotronics.orbitx.uif.printsystem.printerjob.PrinterJobSystem.pr
int(PrinterJobSystem.java:35)
        at com.eurotronics.orbitx.uif.printsystem.BackgroundPrint.run(Background
Print.java:70)
        at java.lang.Thread.run(Unknown Source)

Dynamic libraries:
0x00400000 - 0x00406000         R:\java\jre\bin\java.exe
0x77F60000 - 0x77FBE000         C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000         C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000         C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC5000         C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000         C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000         C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78044000         C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D442000         R:\java\jre\bin\client\jvm.dll
0x77FD0000 - 0x77FFA000         C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000         R:\java\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000         R:\java\jre\bin\verify.dll
0x6D210000 - 0x6D228000         R:\java\jre\bin\java.dll
0x6D320000 - 0x6D32D000         R:\java\jre\bin\zip.dll
0x6D2D0000 - 0x6D2DD000         R:\java\jre\bin\net.dll
0x776D0000 - 0x776D8000         C:\WINNT\system32\WSOCK32.dll
0x776B0000 - 0x776C4000         C:\WINNT\system32\WS2_32.dll
0x776A0000 - 0x776A7000         C:\WINNT\system32\WS2HELP.dll
0x74FF0000 - 0x74FFE000         C:\WINNT\System32\rnr20.dll
0x77BF0000 - 0x77BF7000         C:\WINNT\System32\rpcltc1.dll
0x75360000 - 0x75367000         C:\WINNT\System32\rasadhlp.dll
0x6D000000 - 0x6D0F6000         R:\java\jre\bin\awt.dll
0x77C00000 - 0x77C18000         C:\WINNT\System32\WINSPOOL.DRV
0x76AB0000 - 0x76AB5000         C:\WINNT\System32\IMM32.dll
0x77B20000 - 0x77BD7000         C:\WINNT\system32\ole32.dll
0x271E0000 - 0x271EB000         C:\WINNT\TRAYHOOK.dll
0x70970000 - 0x70B18000         C:\WINNT\system32\SHELL32.dll
0x70BD0000 - 0x70C34000         C:\WINNT\system32\SHLWAPI.dll
0x71780000 - 0x7180A000         C:\WINNT\system32\COMCTL32.dll
0x6D180000 - 0x6D1D0000         R:\java\jre\bin\fontmanager.dll
0x77130000 - 0x77156000         C:\WINNT\System32\ddraw.dll
0x71300000 - 0x71306000         C:\WINNT\system32\MSIDLE.DLL
0x6D130000 - 0x6D152000         R:\java\jre\bin\dcpr.dll
0x77D80000 - 0x77DB2000         C:\WINNT\System32\COMDLG32.DLL
0x775A0000 - 0x775B4000         C:\WINNT\System32\spool\DRIVERS\W32X86\2\RASDDUI
.DLL
0x76AC0000 - 0x76ADD000         C:\WINNT\System32\imagehlp.dll
0x731B0000 - 0x731BA000         C:\WINNT\System32\PSAPI.DLL

Local Time = Tue Jun 04 11:46:46 2002
Elapsed Time = 34
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode)
#
# An error report file has been saved as hs_err_pid187.log.
# Please refer to the file for further information.
#



Other stacktraces of the same problem (always with the same PC=0x6D081C73)

Current Java thread:
	at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
	at sun.awt.windows.WPrinterJob.setPrintService(Unknown Source)
	at sun.print.PrintJob2D.copyAttributes(Unknown Source)
	at sun.print.PrintJob2D.printDialog(Unknown Source)
	at sun.awt.windows.WToolkit.getPrintJob(Unknown Source)
	at com.eurotronics.orbitx.uif.printsystem.printjob.PrintJobSystem.print
(PrintJobSystem.java:249)
	at com.eurotronics.orbitx.uif.printsystem.BackgroundPrint.run
(BackgroundPrint.java:70)
	at java.lang.Thread.run(Unknown Source)

Current Java thread:
	at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
	at sun.awt.windows.WPrinterJob.setPrintService(Unknown Source)
	at sun.print.RasterPrinterJob.getPrintService(Unknown Source)
	at sun.awt.windows.WPrinterJob.getPrintService(Unknown Source)
	at sun.print.PrintJob2D.findNamedPrintService(Unknown Source)
	at sun.print.PrintJob2D.copyAttributes(Unknown Source)
	at sun.print.PrintJob2D.printDialog(Unknown Source)
	at sun.awt.windows.WToolkit.getPrintJob(Unknown Source)

Current Java thread:
	at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
	at sun.awt.windows.WPrinterJob.setPrintService(Unknown Source)
	at sun.print.RasterPrinterJob.getPrintService(Unknown Source)
	at sun.awt.windows.WPrinterJob.getPrintService(Unknown Source)
	at sun.print.PrintJob2D.findNamedPrintService(Unknown Source)
	at sun.print.PrintJob2D.copyAttributes(Unknown Source)
	at sun.print.PrintJob2D.printDialog(Unknown Source)
	at sun.awt.windows.WToolkit.getPrintJob(Unknown Source)

Current Java thread:
	at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
	at sun.awt.windows.WPrinterJob.setPrintService(Unknown Source)
	at sun.print.PrintJob2D.copyAttributes(Unknown Source)
	at sun.print.PrintJob2D.printDialog(Unknown Source)
	at sun.awt.windows.WToolkit.getPrintJob(Unknown Source)


This bug can be reproduced always.

---------- BEGIN SOURCE ----------
static public void main(String[] args)
{
    try
    {
        System.out.println("start");
        JFrame frame = new JFrame("test");
        JobAttributes jobAttributes = new JobAttributes();
        PageAttributes pageAttributes = new PageAttributes();
        PrintJob printJob = Toolkit.getDefaultToolkit().getPrintJob
(frame,"title",jobAttributes,pageAttributes);
        // Crash after the 'OK' button is pressed in the print dialog
        System.out.println("finished");
        System.exit(0);
    }
    catch (Exception e)
    {
        e.printStackTrace();
        System.out.println("error");
        System.exit(1);
    }
}
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Use the older printer driver from 1996-12-03

Release Regression From : 1.3.1
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 148183) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_05 mantis mantis-b02 FIXED IN: 1.4.1_05 mantis mantis-b02 INTEGRATED IN: 1.4.1_05 mantis mantis-b02
14-06-2004

EVALUATION Call to GetPrinter did not fill in the devmode and there was no check for null devmode. ###@###.### 2002-06-18 Fix: Added call to DocumentProperties to fill in the devmode if GetPrinter failed to do this. ###@###.### 2002-07-10 ====================================
18-06-2002