-
Bug
-
Resolution: Fixed
-
P4
-
1.4.1
-
mantis
-
x86
-
windows_98
Name: jk109818 Date: 07/10/2002
FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows 98 [version 4.10.1998]
ADDITIONAL OPERATING SYSTEMS :
None
EXTRA RELEVANT SYSTEM CONFIGURATION :
AuthenticAMD AMD-K6(tm) 3D processor
128Mb RAM
Printer Driver: HP DeskJet 710C Series Version 10.3.
A DESCRIPTION OF THE PROBLEM :
General protection fault if there's a default printer HP
DeskJet 710C installed.
When runs the programme, the runtime crashes on the
call: pj.print(doc, aset);
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the Java Print Service API User Guide example
Print2DGraphics that reproduces the problem.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Instead of executing the statement pj.print(doc, aset);,
crashes the system.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
JAVA provocó un error de protección general
en el módulo HPFWIN13.DLL de 0016:00008019.
Registros:
EAX=51ef0000 CS=50df EIP=00008019 EFLGS=00000297
EBX=00000000 SS=4c5f ESP=000081e2 EBP=000081e6
ECX=0000ffff DS=513f ESI=00000000 FS=0000
EDX=00000000 ES=0000 EDI=00000247 GS=0000
Bytes en CS:EIP:
,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x ,02x
Volcado de pila:
,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x ,08x
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.*;
import java.awt.*;
import java.net.*;
import java.awt.image.*;
import java.awt.print.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
public class Print2DGraphics implements Printable {
public Print2DGraphics() {
/* Construct the print request specification.
* The print data is a Printable object.
* the request additonally specifies a job name, 2 copies,
and
* landscape orientation of the media.
*/
DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
PrintRequestAttributeSet aset = new
HashPrintRequestAttributeSet();
aset.add(OrientationRequested.LANDSCAPE);
aset.add(new Copies(2));
aset.add(new JobName("My job", null));
/* locate a print service that can handle the request */
PrintService[] services =
PrintServiceLookup.lookupPrintServices(flavor,
aset);
if (services.length > 0) {
System.out.println("selected printer " +
services[0].getName());
/* create a print job for the chosen service */
DocPrintJob pj = services[0].createPrintJob();
try {
/*
* Create a Doc object to hold the print
data.
*/
Doc doc = new SimpleDoc(this, flavor,
null);
System.err.println("pre");
/* print the doc as specified */
pj.print(doc, aset);//Crashes !!!!!!!!!
System.err.println("post");
/*
* Do not explicitly call System.exit() when
print returns.
* Printing can be asynchronous so may be
executing in a
* separate thread.
* If you want to explicitly exit the VM,
use a print job
* listener to be notified when it is safe
to do so.
*/
} catch (PrintException e) {
System.err.println(e);
}
}
}
public int print(Graphics g,PageFormat pf,int pageIndex) {
if (pageIndex == 0) {
Graphics2D g2d= (Graphics2D)g;
g2d.translate(pf.getImageableX(),
pf.getImageableY());
g2d.setColor(Color.black);
g2d.drawString("example string", 250, 250);
g2d.fillRect(0, 0, 200, 200);
return Printable.PAGE_EXISTS;
} else {
return Printable.NO_SUCH_PAGE;
}
}
public static void main(String arg[]) {
Print2DGraphics sp = new Print2DGraphics();
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
None.
Doesn?t exists any generic HP DeskJet printer driver for Win
98. Affirmative to Win XP, 3.1 and 3.11.
(Review ID: 159009)
======================================================================
Name: jl125535 Date: 08/08/2002
There is a similar crash in HPFWIN14.DLL with an HP Deskjet 722C.
(Review ID: 160445)
======================================================================
- relates to
-
JDK-4510477 lookupPrintServices on win9x crashes if there's an HP OfficeJet 600 installed
-
- Resolved
-