|
Description
|
SUN Java 2 SDK v1.3.0
HOTSPOT VM ERROR, EXCEPTION_FLT_INVALID_OPERATION
ERROR ID: 4F533F57494E13120E4350500204
ABNORMAL PROGRAM TERMINATION
starting SUN's Java Tutorial "ShapesPrint.class/java" within my own
application from button action:
.. PrintButtonActionPerformed(..)
{
ShapesPrint myPrint = ShapesPrint();
myPrint.Run(); //->> main() renamed tor un() in ShapesPrint.java (runnable)
}
(1) "ShapesPrint" Frame appears
(2) Pressing "Print" Button on ShapesPrint - Frame "Spacebar" keyboard button
(3) -> report error form on Systemout window
(Review ID: 107024)
======================================================================
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
The code is supposed to print a file. It had worked fine on Windows 98 a few
times, but doesn't work anymore. I tried on Windows 95, and got the same error.
Both have the same jdk1.3 version.
The program is basically the same as the print example in
http://java.sun.com/products//jdk/1.2/docs/guide/2d/spec/j2d-print.fm3.html. It
crashes at the first drawString call.
Source Code
------------
import java.awt.*;
import java.awt.print.*;
import java.io.*;
public class PrintListing2 {
public static void main(String[] args) {
PrinterJob job = PrinterJob.getPrinterJob();
PageFormat pf = job.pageDialog(job.defaultPage());
job.setPrintable(new PrintListingPainter(args[0]), pf);
job.setCopies(1);
if (job.printDialog()) {
try { job.print(); }
catch (PrinterException e)
{ System.out.println(e); }
}
System.exit(0);
}
}
class PrintListingPainter implements Printable {
private RandomAccessFile raf;
private String fileName;
private Font fnt = new Font("Helvetica", Font.PLAIN, 10);
private int rememberedPageIndex = -1;
private long rememberedFilePointer = -1;
private boolean rememberedEOF = false;
public PrintListingPainter(String file) {
fileName = file;
try { raf = new RandomAccessFile(file, "r");}
catch (IOException e) {rememberedEOF = true; }
}
public int print(Graphics g, PageFormat pf, int pageIndex) throws PrinterException {
try {
if (pageIndex != rememberedPageIndex) {
rememberedPageIndex = pageIndex;
if (rememberedEOF) return Printable.NO_SUCH_PAGE;
rememberedFilePointer = raf.getFilePointer();
}
else
raf.seek(rememberedFilePointer);
g.setColor(Color.black);
g.setFont(fnt);
int x = (int) pf.getImageableX();
int y = (int) pf.getImageableY();
x += 10;
y += 12;
System.out.println("x = " + x);
System.out.println("y = " + y);
// Title line
g.drawString("File: " + fileName + ", page: " + (pageIndex+1), x, y);
// Generate as many lines as will fit in imageable area
y += 36;
while (y + 12 < pf.getImageableY() +pf.getImageableHeight()) {
String line = raf.readLine();
if (line == null) {
rememberedEOF = true;
break;
}
g.drawString(line, x, y);
y += 12;
}
return Printable.PAGE_EXISTS;
} catch (Exception e) { return Printable.NO_SUCH_PAGE;}
}
}
The error is:
HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
Please report this error at...
Error ID: 4F533F57494E13120E43505002D4
abnormal program termination
(Review ID: 112463)
======================================================================
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) ClientVM (build 1.3.0-C, mixed mode)
Every time i print a pageable, printable Canvas on a Postscript-Printer
like our "Tektronix Phaser 740" my application is ending by an error:
This is the output on my MS-DOS-Console:
#
# HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
# Please reportthis error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E1312E43505002D4
#
abnormal program termination
I tried to mange this via PostScript-Format: I have tried:
- PostScipt ADSC
- PostScript optimal
- PostScript EPS
Everything with the same result.
Here the code:
============================================================================
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import javax.swing.*;
class TestClosing extends WindowAdapter {
public void windowClosing(WindowEvent e) {System.exit(0);}
}
class Test extends JFrame implements ActionListener {
public static void main(String args[]) {new Test();}
private PrintingTest pt;
public Test() {
super();
// Create my pageable & printable Canvas
pt = new PrintingTest();
// Test-Button
JButton testbtn = new JButton("TEST");
testbtn.addActionListener(this);
getContentPane().add(testbtn, BorderLayout.NORTH);
// other stuff ...
addWindowListener(new TestClosing());
this.setLocation(300,300);
pack();
show();
}
public void actionPerformed(ActionEvent ae) {
if (ae.getActionCommand().equals("TEST")) pt.print();
}
}
class PrintingTest extends Canvas implements Pageable, Printable {
PrinterJob pJob;
PageFormat pFormat;
Paper paper;
public PrintingTest() {
pJob = PrinterJob.getPrinterJob();
pJob.setPrintable(this);
pJob.setPageable(this);
pJob.setJobName("Java-Printer-Job");
pFormat = pJob.defaultPage();
paper = pFormat.getPaper();
pFormat.setPaper(paper);
}
public void print() {
if (pJob.printDialog()) {
try {
pJob.print();
} catch(Exception e) {
System.out.println(e.getMessage());
}
}
}
public int getNumberOfPages() {return 1;}
public PageFormat getPageFormat(int pageIndex) {return pFormat;}
public Printable getPrintable(int pageIndex) {return this;}
public int print(Graphics g, PageFormat pf, int pageIndex) {
if (pageIndex < 1) {
g.setColor(Color.black);
// Border
g.drawRect( (int)pFormat.getImageableX()+50,
(int)pFormat.getImageableY()+50,
(int)pFormat.getImageableWidth()-100,
(int)pFormat.getImageableHeight()-100
);
// Page-String
g.drawString( "Page "+(pageIndex+1)+" of 1",
(int)pFormat.getImageableX()+(int)pFormat.getImageableWidth()-125,
(int)pFormat.getImageableY()+(int)pFormat.getImageableHeight()-75
);
// Translation
g.translate((int)(pFormat.getImageableX()+50),(int)(pFormat.getImageableY()+50))
;
g.dispose();
return PAGE_EXISTS;
} else return NO_SUCH_PAGE;
}
}
(Review ID: 113610)
======================================================================
java version "1.3.0"
Java (TM) 2 Runtime Environment, Standard Edition (build 1.3.0-c)
Java HotSpot(TM) Client VM (build 1.3.0-c, mixed mode)
Not sure of the steps on this one. I was printing to a Graphics customer obtained
through a call to PrinterJob.getPrinterJob() as below:
PrinterJob pj = PrinterJob.getPrinterJob();
PageFormat pf = pj.pageDialog(pj.defaultPage());
if (pj.printDialog()) {
pj.setPrintable(report);
pj.print();
}
The print method for the report reference above is:
public int print(Graphics c, PageFormat pf, int index) {
/*
* This printable will always print only one page, so
* if this is not page 0, return NO_SUCH_PAGE
*/
if (index > 0) {
return NO_SUCH_PAGE;
}
else {
try {
/*
* Read a series of JLabels from our Panel and print to the printer
*/
int leftMargin = (new Double(pf.getImageableX() * 72)).intValue();
int topMargin = (new Double(pf.getImageableY() * 72)).intValue();
for (int i = 0; i < panel.getComponentCount(); i++) {
(JLabel) label = (JLabel) panel.getComponent(i);
g.setFont(label.getFont());
g.drawString(label.getText(), label.getLocation().x + leftMargin,
label.getLocation().y + topMargin + label.getFont().getSize());
}
return PAGE_EXISTS;
}
catch(Exception ex) {
ex.printStackTrace();
return NO_SUCH_PAGE;
}
}
}
After running the program the following error was reported:
#
# HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
(Review ID: 113872)
======================================================================
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
After the user pressed 'ok' on the PrintDialog that my program offers him, the
following console message is displayed and the program exits.
#
# HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
The program code is as follows:
import java.awt.*;
import java.awt.print.*;
import java.awt.event.*;
public class PrinterPanel extends Panel implements ActionListener, Printable
{
CPanel cPanel; //panel to be printed
Button bPrint;
Button bCancelPrint;
Button bPageSetup;
PrinterJob printerJob;
PageFormat pageFormat;
Label message;
//static boolean printMode=false;
PrinterPanel(CPanel cPanel)
{
this.cPanel = cPanel;
bPrint = new Button("Print");
bCancelPrint = new Button("Cancel Printing");
bPageSetup = new Button("Page Setup");
message = new Label("Please wait ...");
printerJob = PrinterJob.getPrinterJob();
bPrint.addActionListener(this);
bCancelPrint.addActionListener(this);
bPageSetup.addActionListener(this);
setLayout(new FlowLayout(FlowLayout.LEFT));
setBackground(new Color(22,44,22));
add(bPrint);
add(bCancelPrint);
add(bPageSetup);
add(message);
message.setVisible(false);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource() == bPrint)
{
printerJob.setPrintable(this);
if(printerJob.printDialog())
{
try
{
printerJob.print();
}
catch(PrinterException pe)
{
System.out.println(pe.getMessage());
}
}
}
else if(ae.getSource() == bCancelPrint)
{
if(!printerJob.isCancelled())
{
System.out.println("Cancelling print job.");
printerJob.cancel();
}
}
else
{
pageFormat = printerJob.pageDialog
(printerJob.defaultPage());
printerJob.setPrintable(this, pageFormat);
}
}
public int print(Graphics g, PageFormat pf, int pgIndex)
{
//g = g.create((int)pf.getImageableX(), (int)pf.getImageableY
(), (int)pf.getImageableWidth(), (int)pf.getImageableHeight());
if(pgIndex > 0)
return Printable.NO_SUCH_PAGE;
//printMode=true;
printChart(g, pf);
/*switch(wa.mode)
{
case 0:
wa.drawPie(g);
break;
case 1:
wa.drawBar(g);
break;
case 2:
wa.drawLG(g);
break;
}*/
return Printable.PAGE_EXISTS;
}
public void printChart(Graphics g, PageFormat pf) //function to
position various panels and print them
{
int originX = (int)pf.getImageableX();
int originY = (int)pf.getImageableY();
int imageableWidth = (int)pf.getImageableWidth();
int imageableHeight = (int)pf.getImageableHeight();
/*System.out.println(selectedFile);
System.out.println(cPanel.titlePanel.disp.title);
cPanel.titlePanel.disp.title += selectedFile;
System.out.println(cPanel.titlePanel.disp.title);*/
Graphics g1 = g.create(originX, originY,
cPanel.disp.w1+cPanel.disp.w2, cPanel.disp.h1);
cPanel.titlePanel.draw(g1);
Graphics g2 = g.create(originX, originY+cPanel.disp.h1,
cPanel.disp.w1, cPanel.disp.h1);
cPanel.stubPanel.draw(g2);
Graphics g3 = g.create(originX+cPanel.disp.w1,
originY+cPanel.disp.h1, cPanel.disp.w1+cPanel.disp.w2,
cPanel.disp.h1+cPanel.disp.h1);
cPanel.rulerCanvas.draw(g3);
Graphics g4 = g.create(originX,
originY+cPanel.disp.h1+cPanel.disp.h1, cPanel.disp.w1,
cPanel.disp.h1+cPanel.disp.h1+cPanel.disp.h2);
cPanel.machCanvas.draw(g4);
Graphics g5 = g.create(originX+cPanel.disp.w1,
originY+cPanel.disp.h1+cPanel.disp.h1, cPanel.disp.w1+cPanel.disp.w2,
cPanel.disp.h1+cPanel.disp.h1+cPanel.disp.h2);
cPanel.chartCanvas.displayChart(g5);
Graphics g6 = g.create(originX,
originY+cPanel.disp.h1+cPanel.disp.h1+cPanel.disp.h2,
cPanel.disp.w1+cPanel.disp.w2,
cPanel.disp.h1+cPanel.disp.h1+cPanel.disp.h2+cPanel.disp.h1);
cPanel.messagePanel.draw(g6);
}
}
(Review ID: 114532)
======================================================================
java version 1.3.0
Java (TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot (TM) Client VM (build 1.3.0-C, mixed mode)
This code works fine:
if (pj.printDialog()){
try{
pj.print();
}
catch (PrinterException pe){
System.out.println("Exception while printing.\n");
pe.printStackTrace();
}
}
This code results in an error and abnormal termination of program:
try{
pj.print();
}
catch (PrinterException pe){
System.out.println("Exception while printing.\n");
pe.printStackTrace();
}
The exact error statement reads:
#HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
#Please report this error at
#http://java.sun.com/cgi-bin/bugreport.cgi
#
#Error ID: 4F533F57494E13120E43505002D4
Please note the following:
(1) I am using the Windows Me operating system.
(2) I am a novice developer. However, the only difference between
the working code and the code that results in the error is that
the working code is blocked within an IF statement that calls
the printer dialog.
(Review ID: 117193)
======================================================================
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
i want to make a program to print the image . when i cliked on ok to
PrintDialog it wil give error like as under..........
#
# HotSpot Virtual Machine Error, EXCEPTION_FLT_INVALID_OPERATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
(Review ID: 117628)
======================================================================
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
D:\tutorial\2d\printing\example-1dot2>java ShapesPrint
Unexpected Signal : EXCEPTION_FLT_INVALID_OPERATION occurred at PC=0x66c8ea
Function name=(N/A)
Library=(N/A)
NOTE: We are unable to locate the function name customer for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
0x76AC0000 - 0x76ADD000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL
Local Time = Tue Aug 28 16:17:26 2001
Elapsed Time = 15
#
# HotSpot Virtual Machine Error : EXCEPTION_FLT_INVALID_OPERATION
# Error ID : 4F530E43505002CC
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1-b24 mixed mode)
#
# An error report file has been saved as hs_err_pid4291124921.log.
# Please refer to the file for further information.
#
(Review ID: 130808)
======================================================================
Java VM: Java HotSpot(TM) Client VM (1.4.0-beta2-b77 interpreted mode)
Printing with HP 1220C printer......get faliure with 1.3.1 and 1.4.0-beta2
Unexpected Signal : EXCEPTION_FLT_INVALID_OPERATION occurred at PC=0xBA9E24
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
0x7CC00000 - 0x7CC1D000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL
Local Time = Sun Oct 21 12:47:53 2001
Elapsed Time = 190
#
# HotSpot Virtual Machine Error : EXCEPTION_FLT_INVALID_OPERATION
# Error ID : 4F530E43505002D7
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-beta2-b77 interpreted mode)
#
(Review ID: 134167)
======================================================================
Posted Date : 2005-07-22 03:26:06.0
|
|
Comments
|
Submitted On 14-DEC-2000
mclennon
I have the identical problem under Win 98. same error,
except it ends in D4, not D0. Like the submitter's
experience, it worked a couple of times and then never
again, even though I reverted code back to the version that
worked. It only happens with postScript Driver, when I
switch to HP Driver for the same printer, all is OK.
Submitted On 15-DEC-2000
tcole
I am getting this error on a Win98 system, Java2 build
1.3.0-c printing to an HP LaserJet2100 using PCL 6 driver.
Submitted On 14-APR-2001
Rad
I am having this problem on a WinME system with an HP932C printer. Interestingly enough, if 1.3.0 is used,
there is no problem. If I use 1.3.0_01 or 1.3.0_02, the problems begin...
Submitted On 14-MAY-2001
AlanSmoke1
I had this problem as well. I fixed it by downloading
the most recent driver for my HP 970c.
Submitted On 22-OCT-2001
jcheyns
I get this error on Win 98 system using a HP 4L laserjet
with the newest driver.
I also had my program working once, and then no more, even
though no code was changed. It also occured with one of the
examples of the document about printing on the sun page.
I can however print form a JEditorPane, where a html file
is loaded in using new JEditorPane(file.html). So I plan to
work around it by creating a html file in the program and
putting this in a pane which will be printed. It should
work fine, although I find it quite dirty.
Submitted On 27-OCT-2001
davoz
I have this error when I try to print under Win98 on
Lexmark and Kyocera.
Unexpected Signal : EXCEPTION_FLT_INVALID_OPERATION
occurred at PC=0x669142
Function name=(N/A)
Library=(N/A)
NOTE: We are unable to locate the function name symbol for
the error
just occurred. Please refer to release documentation
for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
0x09B10000 - 0x09B23000
C:\PROGRAMMI\SIOPROD\WIN32PRINTER.DLL
Local Time = Sat Oct 27 14:59:54 2001
Elapsed Time = 60
#
# HotSpot Virtual Machine Error :
EXCEPTION_FLT_INVALID_OPERATION
# Error ID : 4F530E43505002CC
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1-b24 mixed mode)
#
Submitted On 29-OCT-2001
gmartinelli
I have this problem as well. I donwloaded the JRE 1.3.0_01 yesterday. It works fine when I print on a HP
Photosmart P1000 under WI/2K, but it does work for a HP 840C under Win98.
The symptom is exactly the same as the one reported in july 2000:
Dynamic libraries:
0x7CC00000 - 0x7CC1D000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL
Submitted On 26-SEP-2002
luggypm
This problem appears on my system (jdk 1.4.0 under 98lite 4.5) when the you use the print dialog to set a printer that isn't the default. Another machine I have access to blue screens just after showing the error.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|