-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.0.1, 1.3.0
-
generic, x86
-
generic, windows_nt, windows_2000
elcius);
panel2.add(farenAKelvin);
panel2.add(kelvinACelcius);
panel2.add(kelvinAFaren);
panel2.add(celciusAFaren);
panel2.add(celciusAKelvin);
panel3.add(labSalida);
panel3.add(campoSalida);
panel1.setSize(100, 200);
panel2.setSize(200, 250);
panel3.setSize(100, 200);
farenACelcius.addActionListener(this);
farenAKelvin.addActionListener(this);
kelvinACelcius.addActionListener(this);
kelvinAFaren.addActionListener(this);
celciusAFaren.addActionListener(this);
celciusAKelvin.addActionListener(this);
getContentPane().add(panel1, BorderLayout.WEST);
getContentPane().add(panel2, BorderLayout.CENTER);
getContentPane().add(panel3, BorderLayout.EAST);
setSize(400, 250);
show();
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == farenACelcius)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 32;
else if(e.getSource() == farenAKelvin)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 305;
else if(e.getSource() == kelvinACelcius)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() - 273;
else if(e.getSource() == kelvinAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 305) * ((float)5/9);
else if(e.getSource() == celciusAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 32) * ((float)5/9);
else if(e.getSource() == celciusAKelvin)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() + 273;
campoSalida.setText(Float.toString(tSalida));
}
}
public class Temperatura{
public static void main(String args[]){
frameTemperat Temper = new frameTemperat();
Temper.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
------------- End of Second Java Program -----------
(Review ID: 109447)
======================================================================
Name: ks88420 Date: 09/13/2000
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)
All I did was try to compile my program when this error occured. I then
recompiled, but the second time it worked fine.
Following is the source code (forgive it's bugs, I'm still learning!):
*************************************
import java.io.*;
import java.net.*;
class ReadAndSave
{
final static String FILENAME = "KeyboardInput.txt";
public static void main(String[] args)
{
File saveFile = new File(this.FILENAME);
FileWriter writeFile = new FileWriter(saveFile);
String input;
BufferedReader stdIn = new BufferedReader(new InputStreamReader(
System.in));
while ((input = stdIn.readLine()) !=null)
writeFile.write(input);
writeFile.close();
stdIn.close();
}
}
******************************************************************
The error that was displayed was as more or less as follows:
Hotspot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
Please report this bug to http://java.sun.com/cgi-bin/bugreport.cgi
Error ID: 4F533F57494E1312DE43505002D4
(Review ID: 109585)
======================================================================
Name: ks88420 Date: 09/14/2000
C:\>java -version
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)
While runing a client to a weblogic server recieved the following
Exception in thread "main" #
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
(Review ID: 109619)
======================================================================
Name: ks88420 Date: 09/14/2000
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)
No Compiling-Errors occured but on starting the application it crashes.
Code:
class Registry extends Object
{
static
{
System.loadLibrary ("reg");
}
public native void GetNavPath ( );
public native void GetExpPath ( );
public static void main ( String args[] )
{
Registry This = new Registry();
This.GetNavPath ( );
This.GetExpPath ( );
}
}
Error Message (in Kawa):
D:\prod\jdk1.3\bin\java.exe Registry
Working Directory - D:\regClass Path - D:\prod\jswdk-1.0.1\src;D:\prod\jdk1.3
\lib\tools.jar;.;D:\devtools\Kawa4.01\kawaclasses.zip;d:\prod\jdk1.3
\jre\lib\rt.jar;d:\prod\jdk1.3\jre\lib\i18n.jar;D:\reg
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
Process Exit...
(Review ID: 109571)
======================================================================
Name: ks88420 Date: 09/22/2000
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)
Hi, here is the information,
Pentium II 400 256 Mb RAM, Windows NT 4.0 SP5
I have about 15 types of object strongly connected through TreeSets collections,
there is a root object. The problem occurs when I try to serialize it through
an ObjectOutputStream using the writeObject() method. After a while,
i get the following message:
#
# HotSpot Virtual Machine Error, EXCEPTION_STACK_OVERFLOW
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
----------
with JRE1.2.2, I only get a stackoverflow during the serialization process.
In the following exceptio trace you ll notice I ve implement the
private void writeObject( ObjectOutputStream) method, that's only for debugging
purposes:
java.lang.StackOverflowError
at java.io.ObjectOutputStream.writeCode(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.serializeNullAndRepeat(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java, Compiled Code)
at de.lineas.zss.entities.Entity.performWriteObject(Entity.java, Compiled Code)
at de.lineas.zss.entities.Meldeort.writeObject(Meldeort.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java, Compiled Code)
at de.lineas.zss.entities.Entity.performWriteObject(Entity.java, Compiled Code)
at de.lineas.zss.entities.Signal.writeObject(Signal.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
... etc.
(Review ID: 109811)
======================================================================
Name: yyT116575 Date: 01/11/2001
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 problem raised when i tried to to get a list of the methods list on a class
object, and passing null, null as the method arguments:
Method myMethod = myClass.getMethod(null,null);
the following message appeared when i executed the program:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
THE PROGRAM SOURCE CODE:
package testproject;
import java.lang.reflect.*;
public class ReflectionExample {
public void printGreeting(){
System.out.println("Hello World !!!");
}
public ReflectionExample() {
}
public static void main(String[] args) {
try{
ReflectionExample reflectionExample1 = new ReflectionExample();
Class myClass = reflectionExample1.getClass();
Method[] methods = myClass.getMethods();
Method myMethod = myClass.getMethod(null,null);
myMethod.invoke(reflectionExample1, new Object[0]);
}
catch(NoSuchMethodException nsme){System.out.println(nsme);}
catch(Exception e){System.out.println(e);}
}
}
(Review ID: 114950)
======================================================================
Name: krC82822 Date: 02/18/2001
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)
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
#
# An EXCEPTION_STACK_OVERFLOW exception has been detected in native code
outside the VM.
# Program counter=0x5025c2c7
#
(Review ID: 117208)
======================================================================
Name: tb29552 Date: 09/07/2000
/*
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)
Providing a null argument for the name of the method in
getDeclaredMethods(String name, Class[] args) causes VM to crash with the
following output:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
Source code:
*/
//
class NullTest {
public static void main(String[] args) {
try {
Class c = Class.forName("java.lang.String");
java.lang.reflect.Method m = c.getDeclaredMethod(null, null);
} catch(NoSuchMethodException ex) {
System.err.println("No such method found");
} catch(Exception ex) {
ex.printStackTrace();
}
/*
* Type of class to call the method on is irrelevant.
*/
}
}
(Review ID: 109368)
======================================================================
Name: ks88420 Date: 10/03/2000
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)
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
(Review ID: 110305)
======================================================================
Name: ks88420 Date: 10/04/2000
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)
1. After an random interval (1 hour - 1day) the following message is displayed:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
(Review ID: 110397)
======================================================================
Name: ks88420 Date: 09/11/2000
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)
Was running threads, below is the error:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
below is the code:
import java.io.*;
import java.net.*;
import java.util.*;
public class ipCheck implements Runnable
{
Ip ips[] = new Ip[65025];
private int numThreads = 20;
public ipCheck()
{
runShit();
}
public static void main(String argv[])
{
new ipCheck();
}
public void runShit()
{
int num = 0;
for (int i = 1; i < 255; i++)
for (int j = 1; j < 255; j++)
{
ips[num] = new Ip("128.238." + i + "." + j);
num++;
}
System.out.println("Done");
try {
Thread me = new Thread(this);
me.setPriority(Thread.MIN_PRIORITY);
me.start();
} catch (Exception e)
{ System.out.println(e.toString()); }
}
public void run()
{
Thread checks[] = new Thread[numThreads];
Ip current[] = new Ip[numThreads];
int pos = 0;
for (int i = 0; i < numThreads; i++)
{
checks[i] = new Thread(ips[pos]);
checks[i].setPriority(Thread.MIN_PRIORITY);
checks[i].start();
current[i] = ips[pos];
pos++;
}
while (true)
{
try {
Thread.sleep(10);
for (int i = 0; i < numThreads; i++)
{
if (!current[i].ifRunning())
{
checks[i].stop();
System.out.println("Stopped: " + pos);
checks[i] = new Thread(ips[pos]);
checks[i].setPriority
(Thread.MIN_PRIORITY);
checks[i].start();
current[i] = ips[pos];
pos++;
}
}
} catch (Exception e) {}
}
}
}
import java.io.*;
import java.net.*;
import java.util.*;
public class Ip implements Runnable
{
private String host = null;
private boolean running = false;
public Ip(String ip)
{
host = ip;
}
public void run()
{
System.out.println("Hello: " + host);
running = true;
check();
while (running)
{
try {
Thread.sleep(20);
} catch (Exception e) {}
}
}
public boolean ifRunning()
{
return running;
}
public void check()
{
try {
Socket connection = new Socket(host, 80);
System.out.println(host + " - ok");
connection.close();
} catch (Exception e)
{ }
running = false;
}
}
here is the error:
(Review ID: 109461)
======================================================================
Name: ks88420 Date: 09/11/2000
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 had this bug while i was compiling, and while the application was running. In
win 98, working with two windows: MS DOS prompt and a IE 5.00 window with the
javadocs opened. This application was compilated and running without any
problem before, but suddenly the frame was closed and in MSDOS shell this
message did appear:
C:\Trabajos\Interfaz\Lab1>java Temperatura
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
C:\Trabajos\Interfaz\Lab1>_
After this, I tried to compound the sourcecode and re-compile it, and this
message did appears:
An exception has occurred in the compiler (1.3.0). Please file a bug at the Java
Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your
program and the following diagnostic in your report. Thank you.
java.lang.ClassFormatError: com/sun/tools/javac/v8/parser/Scanner (Illegal const
ant pool index)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at com.sun.tools.javac.v8.JavaCompiler.parse(JavaCompiler.java:241)
at com.sun.tools.javac.v8.JavaCompiler.parse(JavaCompiler.java:267)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:355)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
And any time I tried to re-compile, this message did appears. Even, with others
programs I have.
After that, I turned off my computer, and after 10 seconds I turned it on, and
this bug didn't appear again.
I must remark that I'm just learning how to program with Swing APIs, I used to
program with awt components.
The programs converts some temperature units, such Celcius, Farenheit, Kelvin,
etc. It uses a couple of TextFields and Labels, and six buttons for each
conversion.
here's the code of the first program, when it was suddenly closed, and the code
from the second program, when I couln't compile any Java program:
----------- first Java program -------------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class frameTemperat extends JFrame implements ActionListener{
JLabel labEntrada, labSalida;
JLabel Vacio;
TextField campoEntrada;
TextField campoSalida;
float tEntrada;
float tSalida;
JButton farenACelcius;
JButton farenAKelvin;
JButton kelvinACelcius;
JButton kelvinAFaren;
JButton celciusAFaren;
JButton celciusAKelvin;
JPanel panel1, panel2, panel3;
public frameTemperat(){
panel1 = new JPanel(new GridLayout(4, 1));
panel2 = new JPanel(new GridLayout(6,1));
panel3 = new JPanel(new BorderLayout());
campoEntrada = new TextField(8);
campoSalida = new TextField(8);
labEntrada = new JLabel("Ingrese la temperatura:");
labSalida = new JLabel("Resultado:");
Vacio = new JLabel(" ");
farenACelcius = new JButton("Farenheit - Celcius");
farenAKelvin = new JButton("Farenheit - Kelvin");
kelvinACelcius = new JButton("Kelvin - Celcius");
kelvinAFaren = new JButton("Kelvin - Farenheit");
celciusAFaren = new JButton("Celcius - Farenheit");
celciusAKelvin = new JButton("Celcius - Kelvin");
panel1.add(Vacio);
panel1.add(labEntrada);
panel1.add(campoEntrada);
panel1.add(Vacio);
panel2.add(farenACelcius);
panel2.add(farenAKelvin);
panel2.add(kelvinACelcius);
panel2.add(kelvinAFaren);
panel2.add(celciusAFaren);
panel2.add(celciusAKelvin);
panel3.add(labSalida);
panel3.add(campoSalida);
panel1.setSize(100, 200);
panel2.setSize(200, 250);
panel3.setSize(100, 200);
farenACelcius.addActionListener(this);
farenAKelvin.addActionListener(this);
kelvinACelcius.addActionListener(this);
kelvinAFaren.addActionListener(this);
celciusAFaren.addActionListener(this);
celciusAKelvin.addActionListener(this);
getContentPane().add(panel1, BorderLayout.WEST);
getContentPane().add(panel2, BorderLayout.CENTER);
getContentPane().add(panel3, BorderLayout.EAST);
setSize(400, 250);
show();
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == farenACelcius)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 32;
else if(e.getSource() == farenAKelvin)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 305;
else if(e.getSource() == kelvinACelcius)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() - 273;
else if(e.getSource() == kelvinAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 305) * ((float)5/9);
else if(e.getSource() == celciusAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 32) * ((float)5/9);
else if(e.getSource() == celciusAKelvin)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() + 273;
campoSalida.setText(Float.toString(tSalida));
}
}
public class Temperatura{
public static void main(String args[]){
frameTemperat Temper = new frameTemperat();
Temper.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
----------- End of First Java Program -----
----------- Second Java Program -----------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class frameTemperat extends JFrame implements ActionListener{
JLabel labEntrada, labSalida;
JLabel Vacio;
TextField campoEntrada;
TextField campoSalida;
float tEntrada;
float tSalida;
JButton farenACelcius;
JButton farenAKelvin;
JButton kelvinACelcius;
JButton kelvinAFaren;
JButton celciusAFaren;
JButton celciusAKelvin;
JPanel panel1, panel2, panel3;
public frameTemperat(){
panel1 = new JPanel(new GridLayout(4, 1, 15, 15));
panel2 = new JPanel(new GridLayout(6, 1, 5, 5));
panel3 = new JPanel(new BorderLayout());
campoEntrada = new TextField(8);
campoSalida = new TextField(8);
labEntrada = new JLabel("Ingrese la temperatura:");
labSalida = new JLabel("Resultado:");
Vacio = new JLabel(" ");
farenACelcius = new JButton("Farenheit - Celcius");
farenAKelvin = new JButton("Farenheit - Kelvin");
kelvinACelcius = new JButton("Kelvin - Celcius");
kelvinAFaren = new JButton("Kelvin - Farenheit");
celciusAFaren = new JButton("Celcius - Farenheit");
celciusAKelvin = new JButton("Celcius - Kelvin");
panel1.add(Vacio);
panel1.add(labEntrada);
panel1.add(campoEntrada);
panel1.add(Vacio);
panel2.add(farenAC
panel2.add(farenAKelvin);
panel2.add(kelvinACelcius);
panel2.add(kelvinAFaren);
panel2.add(celciusAFaren);
panel2.add(celciusAKelvin);
panel3.add(labSalida);
panel3.add(campoSalida);
panel1.setSize(100, 200);
panel2.setSize(200, 250);
panel3.setSize(100, 200);
farenACelcius.addActionListener(this);
farenAKelvin.addActionListener(this);
kelvinACelcius.addActionListener(this);
kelvinAFaren.addActionListener(this);
celciusAFaren.addActionListener(this);
celciusAKelvin.addActionListener(this);
getContentPane().add(panel1, BorderLayout.WEST);
getContentPane().add(panel2, BorderLayout.CENTER);
getContentPane().add(panel3, BorderLayout.EAST);
setSize(400, 250);
show();
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == farenACelcius)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 32;
else if(e.getSource() == farenAKelvin)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 305;
else if(e.getSource() == kelvinACelcius)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() - 273;
else if(e.getSource() == kelvinAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 305) * ((float)5/9);
else if(e.getSource() == celciusAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 32) * ((float)5/9);
else if(e.getSource() == celciusAKelvin)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() + 273;
campoSalida.setText(Float.toString(tSalida));
}
}
public class Temperatura{
public static void main(String args[]){
frameTemperat Temper = new frameTemperat();
Temper.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
------------- End of Second Java Program -----------
(Review ID: 109447)
======================================================================
Name: ks88420 Date: 09/13/2000
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)
All I did was try to compile my program when this error occured. I then
recompiled, but the second time it worked fine.
Following is the source code (forgive it's bugs, I'm still learning!):
*************************************
import java.io.*;
import java.net.*;
class ReadAndSave
{
final static String FILENAME = "KeyboardInput.txt";
public static void main(String[] args)
{
File saveFile = new File(this.FILENAME);
FileWriter writeFile = new FileWriter(saveFile);
String input;
BufferedReader stdIn = new BufferedReader(new InputStreamReader(
System.in));
while ((input = stdIn.readLine()) !=null)
writeFile.write(input);
writeFile.close();
stdIn.close();
}
}
******************************************************************
The error that was displayed was as more or less as follows:
Hotspot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
Please report this bug to http://java.sun.com/cgi-bin/bugreport.cgi
Error ID: 4F533F57494E1312DE43505002D4
(Review ID: 109585)
======================================================================
Name: ks88420 Date: 09/14/2000
C:\>java -version
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)
While runing a client to a weblogic server recieved the following
Exception in thread "main" #
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
(Review ID: 109619)
======================================================================
Name: ks88420 Date: 09/14/2000
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)
No Compiling-Errors occured but on starting the application it crashes.
Code:
class Registry extends Object
{
static
{
System.loadLibrary ("reg");
}
public native void GetNavPath ( );
public native void GetExpPath ( );
public static void main ( String args[] )
{
Registry This = new Registry();
This.GetNavPath ( );
This.GetExpPath ( );
}
}
Error Message (in Kawa):
D:\prod\jdk1.3\bin\java.exe Registry
Working Directory - D:\regClass Path - D:\prod\jswdk-1.0.1\src;D:\prod\jdk1.3
\lib\tools.jar;.;D:\devtools\Kawa4.01\kawaclasses.zip;d:\prod\jdk1.3
\jre\lib\rt.jar;d:\prod\jdk1.3\jre\lib\i18n.jar;D:\reg
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
Process Exit...
(Review ID: 109571)
======================================================================
Name: ks88420 Date: 09/22/2000
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)
Hi, here is the information,
Pentium II 400 256 Mb RAM, Windows NT 4.0 SP5
I have about 15 types of object strongly connected through TreeSets collections,
there is a root object. The problem occurs when I try to serialize it through
an ObjectOutputStream using the writeObject() method. After a while,
i get the following message:
#
# HotSpot Virtual Machine Error, EXCEPTION_STACK_OVERFLOW
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
----------
with JRE1.2.2, I only get a stackoverflow during the serialization process.
In the following exceptio trace you ll notice I ve implement the
private void writeObject( ObjectOutputStream) method, that's only for debugging
purposes:
java.lang.StackOverflowError
at java.io.ObjectOutputStream.writeCode(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.serializeNullAndRepeat(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java, Compiled Code)
at de.lineas.zss.entities.Entity.performWriteObject(Entity.java, Compiled Code)
at de.lineas.zss.entities.Meldeort.writeObject(Meldeort.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java, Compiled Code)
at de.lineas.zss.entities.Entity.performWriteObject(Entity.java, Compiled Code)
at de.lineas.zss.entities.Signal.writeObject(Signal.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java, Compiled Code)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java, Compiled Code)
at java.util.TreeSet.writeObject(TreeSet.java, Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
... etc.
(Review ID: 109811)
======================================================================
Name: yyT116575 Date: 01/11/2001
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 problem raised when i tried to to get a list of the methods list on a class
object, and passing null, null as the method arguments:
Method myMethod = myClass.getMethod(null,null);
the following message appeared when i executed the program:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
THE PROGRAM SOURCE CODE:
package testproject;
import java.lang.reflect.*;
public class ReflectionExample {
public void printGreeting(){
System.out.println("Hello World !!!");
}
public ReflectionExample() {
}
public static void main(String[] args) {
try{
ReflectionExample reflectionExample1 = new ReflectionExample();
Class myClass = reflectionExample1.getClass();
Method[] methods = myClass.getMethods();
Method myMethod = myClass.getMethod(null,null);
myMethod.invoke(reflectionExample1, new Object[0]);
}
catch(NoSuchMethodException nsme){System.out.println(nsme);}
catch(Exception e){System.out.println(e);}
}
}
(Review ID: 114950)
======================================================================
Name: krC82822 Date: 02/18/2001
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)
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
#
# An EXCEPTION_STACK_OVERFLOW exception has been detected in native code
outside the VM.
# Program counter=0x5025c2c7
#
(Review ID: 117208)
======================================================================
Name: tb29552 Date: 09/07/2000
/*
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)
Providing a null argument for the name of the method in
getDeclaredMethods(String name, Class[] args) causes VM to crash with the
following output:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
Source code:
*/
//
class NullTest {
public static void main(String[] args) {
try {
Class c = Class.forName("java.lang.String");
java.lang.reflect.Method m = c.getDeclaredMethod(null, null);
} catch(NoSuchMethodException ex) {
System.err.println("No such method found");
} catch(Exception ex) {
ex.printStackTrace();
}
/*
* Type of class to call the method on is irrelevant.
*/
}
}
(Review ID: 109368)
======================================================================
Name: ks88420 Date: 10/03/2000
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)
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
(Review ID: 110305)
======================================================================
Name: ks88420 Date: 10/04/2000
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)
1. After an random interval (1 hour - 1day) the following message is displayed:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
(Review ID: 110397)
======================================================================
Name: ks88420 Date: 09/11/2000
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)
Was running threads, below is the error:
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
below is the code:
import java.io.*;
import java.net.*;
import java.util.*;
public class ipCheck implements Runnable
{
Ip ips[] = new Ip[65025];
private int numThreads = 20;
public ipCheck()
{
runShit();
}
public static void main(String argv[])
{
new ipCheck();
}
public void runShit()
{
int num = 0;
for (int i = 1; i < 255; i++)
for (int j = 1; j < 255; j++)
{
ips[num] = new Ip("128.238." + i + "." + j);
num++;
}
System.out.println("Done");
try {
Thread me = new Thread(this);
me.setPriority(Thread.MIN_PRIORITY);
me.start();
} catch (Exception e)
{ System.out.println(e.toString()); }
}
public void run()
{
Thread checks[] = new Thread[numThreads];
Ip current[] = new Ip[numThreads];
int pos = 0;
for (int i = 0; i < numThreads; i++)
{
checks[i] = new Thread(ips[pos]);
checks[i].setPriority(Thread.MIN_PRIORITY);
checks[i].start();
current[i] = ips[pos];
pos++;
}
while (true)
{
try {
Thread.sleep(10);
for (int i = 0; i < numThreads; i++)
{
if (!current[i].ifRunning())
{
checks[i].stop();
System.out.println("Stopped: " + pos);
checks[i] = new Thread(ips[pos]);
checks[i].setPriority
(Thread.MIN_PRIORITY);
checks[i].start();
current[i] = ips[pos];
pos++;
}
}
} catch (Exception e) {}
}
}
}
import java.io.*;
import java.net.*;
import java.util.*;
public class Ip implements Runnable
{
private String host = null;
private boolean running = false;
public Ip(String ip)
{
host = ip;
}
public void run()
{
System.out.println("Hello: " + host);
running = true;
check();
while (running)
{
try {
Thread.sleep(20);
} catch (Exception e) {}
}
}
public boolean ifRunning()
{
return running;
}
public void check()
{
try {
Socket connection = new Socket(host, 80);
System.out.println(host + " - ok");
connection.close();
} catch (Exception e)
{ }
running = false;
}
}
here is the error:
(Review ID: 109461)
======================================================================
Name: ks88420 Date: 09/11/2000
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 had this bug while i was compiling, and while the application was running. In
win 98, working with two windows: MS DOS prompt and a IE 5.00 window with the
javadocs opened. This application was compilated and running without any
problem before, but suddenly the frame was closed and in MSDOS shell this
message did appear:
C:\Trabajos\Interfaz\Lab1>java Temperatura
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
C:\Trabajos\Interfaz\Lab1>_
After this, I tried to compound the sourcecode and re-compile it, and this
message did appears:
An exception has occurred in the compiler (1.3.0). Please file a bug at the Java
Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your
program and the following diagnostic in your report. Thank you.
java.lang.ClassFormatError: com/sun/tools/javac/v8/parser/Scanner (Illegal const
ant pool index)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at com.sun.tools.javac.v8.JavaCompiler.parse(JavaCompiler.java:241)
at com.sun.tools.javac.v8.JavaCompiler.parse(JavaCompiler.java:267)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:355)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
And any time I tried to re-compile, this message did appears. Even, with others
programs I have.
After that, I turned off my computer, and after 10 seconds I turned it on, and
this bug didn't appear again.
I must remark that I'm just learning how to program with Swing APIs, I used to
program with awt components.
The programs converts some temperature units, such Celcius, Farenheit, Kelvin,
etc. It uses a couple of TextFields and Labels, and six buttons for each
conversion.
here's the code of the first program, when it was suddenly closed, and the code
from the second program, when I couln't compile any Java program:
----------- first Java program -------------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class frameTemperat extends JFrame implements ActionListener{
JLabel labEntrada, labSalida;
JLabel Vacio;
TextField campoEntrada;
TextField campoSalida;
float tEntrada;
float tSalida;
JButton farenACelcius;
JButton farenAKelvin;
JButton kelvinACelcius;
JButton kelvinAFaren;
JButton celciusAFaren;
JButton celciusAKelvin;
JPanel panel1, panel2, panel3;
public frameTemperat(){
panel1 = new JPanel(new GridLayout(4, 1));
panel2 = new JPanel(new GridLayout(6,1));
panel3 = new JPanel(new BorderLayout());
campoEntrada = new TextField(8);
campoSalida = new TextField(8);
labEntrada = new JLabel("Ingrese la temperatura:");
labSalida = new JLabel("Resultado:");
Vacio = new JLabel(" ");
farenACelcius = new JButton("Farenheit - Celcius");
farenAKelvin = new JButton("Farenheit - Kelvin");
kelvinACelcius = new JButton("Kelvin - Celcius");
kelvinAFaren = new JButton("Kelvin - Farenheit");
celciusAFaren = new JButton("Celcius - Farenheit");
celciusAKelvin = new JButton("Celcius - Kelvin");
panel1.add(Vacio);
panel1.add(labEntrada);
panel1.add(campoEntrada);
panel1.add(Vacio);
panel2.add(farenACelcius);
panel2.add(farenAKelvin);
panel2.add(kelvinACelcius);
panel2.add(kelvinAFaren);
panel2.add(celciusAFaren);
panel2.add(celciusAKelvin);
panel3.add(labSalida);
panel3.add(campoSalida);
panel1.setSize(100, 200);
panel2.setSize(200, 250);
panel3.setSize(100, 200);
farenACelcius.addActionListener(this);
farenAKelvin.addActionListener(this);
kelvinACelcius.addActionListener(this);
kelvinAFaren.addActionListener(this);
celciusAFaren.addActionListener(this);
celciusAKelvin.addActionListener(this);
getContentPane().add(panel1, BorderLayout.WEST);
getContentPane().add(panel2, BorderLayout.CENTER);
getContentPane().add(panel3, BorderLayout.EAST);
setSize(400, 250);
show();
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == farenACelcius)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 32;
else if(e.getSource() == farenAKelvin)
tSalida = ((float)9/5) * Float.valueOf
(campoEntrada.getText()).floatValue() + 305;
else if(e.getSource() == kelvinACelcius)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() - 273;
else if(e.getSource() == kelvinAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 305) * ((float)5/9);
else if(e.getSource() == celciusAFaren)
tSalida = (Float.valueOf(campoEntrada.getText
()).floatValue() - 32) * ((float)5/9);
else if(e.getSource() == celciusAKelvin)
tSalida = Float.valueOf(campoEntrada.getText
()).floatValue() + 273;
campoSalida.setText(Float.toString(tSalida));
}
}
public class Temperatura{
public static void main(String args[]){
frameTemperat Temper = new frameTemperat();
Temper.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
----------- End of First Java Program -----
----------- Second Java Program -----------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class frameTemperat extends JFrame implements ActionListener{
JLabel labEntrada, labSalida;
JLabel Vacio;
TextField campoEntrada;
TextField campoSalida;
float tEntrada;
float tSalida;
JButton farenACelcius;
JButton farenAKelvin;
JButton kelvinACelcius;
JButton kelvinAFaren;
JButton celciusAFaren;
JButton celciusAKelvin;
JPanel panel1, panel2, panel3;
public frameTemperat(){
panel1 = new JPanel(new GridLayout(4, 1, 15, 15));
panel2 = new JPanel(new GridLayout(6, 1, 5, 5));
panel3 = new JPanel(new BorderLayout());
campoEntrada = new TextField(8);
campoSalida = new TextField(8);
labEntrada = new JLabel("Ingrese la temperatura:");
labSalida = new JLabel("Resultado:");
Vacio = new JLabel(" ");
farenACelcius = new JButton("Farenheit - Celcius");
farenAKelvin = new JButton("Farenheit - Kelvin");
kelvinACelcius = new JButton("Kelvin - Celcius");
kelvinAFaren = new JButton("Kelvin - Farenheit");
celciusAFaren = new JButton("Celcius - Farenheit");
celciusAKelvin = new JButton("Celcius - Kelvin");
panel1.add(Vacio);
panel1.add(labEntrada);
panel1.add(campoEntrada);
panel1.add(Vacio);
panel2.add(farenAC