-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0, 6
-
x86
-
windows_2000, windows_xp
Name: rmT116609 Date: 04/30/2003
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
java.lang.InternalError instead of Exception
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.io.*;
import java.applet.*;
import java.awt.*;
public class ReadString extends Applet{
public static void crash() {
byte[] b = new byte[2];
b[0]=(byte)0xff;
b[1]=(byte)0xfe;
ByteArrayInputStream bais = new ByteArrayInputStream(b);
String s;
InputStreamReader isr= null;
try{
isr = new InputStreamReader(bais,"Unicode");
}
catch (java.io.UnsupportedEncodingException e) { e.printStackTrace(); }
BufferedReader in = new BufferedReader( isr );
try {
while ( (s = in.readLine()) != null ) { System.out.println( s );}
}
catch (java.io.IOException e) { e.printStackTrace(); }
}
public void paint(Graphics g) {
crash();
}
public static void main(String[] a) {
crash();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
Exception
Exception in thread "main" java.lang.InternalError: Converter malfunction (Unico
de) -- please submit a bug report via http://java.sun.com/cgi-bin/bugreport.cgi
at sun.nio.cs.StreamDecoder$ConverterSD.malfunction(StreamDecoder.java:2
33)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
49)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:295)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at ReadString.crash(ReadString.java:23)
at ReadString.main(ReadString.java:36)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.InternalError: Converter malfunction (Unico
de) -- please submit a bug report via http://java.sun.com/cgi-bin/bugreport.cgi
at sun.nio.cs.StreamDecoder$ConverterSD.malfunction(StreamDecoder.java:2
33)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
49)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:295)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at ReadString.crash(ReadString.java:23)
at ReadString.main(ReadString.java:36)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.*;
import java.applet.*;
import java.awt.*;
public class ReadString extends Applet{
public static void crash() {
byte[] b = new byte[2];
b[0]=(byte)0xff;
b[1]=(byte)0xfe;
ByteArrayInputStream bais = new ByteArrayInputStream(b);
String s;
InputStreamReader isr= null;
try{
isr = new InputStreamReader(bais,"Unicode");
}
catch (java.io.UnsupportedEncodingException e) { e.printStackTrace(); }
BufferedReader in = new BufferedReader( isr );
try {
while ( (s = in.readLine()) != null ) { System.out.println( s );}
}
catch (java.io.IOException e) { e.printStackTrace(); }
}
public void paint(Graphics g) {
crash();
}
public static void main(String[] a) {
crash();
}
}
---------- END SOURCE ----------
(Review ID: 185057)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
java.lang.InternalError instead of Exception
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.io.*;
import java.applet.*;
import java.awt.*;
public class ReadString extends Applet{
public static void crash() {
byte[] b = new byte[2];
b[0]=(byte)0xff;
b[1]=(byte)0xfe;
ByteArrayInputStream bais = new ByteArrayInputStream(b);
String s;
InputStreamReader isr= null;
try{
isr = new InputStreamReader(bais,"Unicode");
}
catch (java.io.UnsupportedEncodingException e) { e.printStackTrace(); }
BufferedReader in = new BufferedReader( isr );
try {
while ( (s = in.readLine()) != null ) { System.out.println( s );}
}
catch (java.io.IOException e) { e.printStackTrace(); }
}
public void paint(Graphics g) {
crash();
}
public static void main(String[] a) {
crash();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
Exception
Exception in thread "main" java.lang.InternalError: Converter malfunction (Unico
de) -- please submit a bug report via http://java.sun.com/cgi-bin/bugreport.cgi
at sun.nio.cs.StreamDecoder$ConverterSD.malfunction(StreamDecoder.java:2
33)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
49)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:295)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at ReadString.crash(ReadString.java:23)
at ReadString.main(ReadString.java:36)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.InternalError: Converter malfunction (Unico
de) -- please submit a bug report via http://java.sun.com/cgi-bin/bugreport.cgi
at sun.nio.cs.StreamDecoder$ConverterSD.malfunction(StreamDecoder.java:2
33)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
49)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:295)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at ReadString.crash(ReadString.java:23)
at ReadString.main(ReadString.java:36)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.*;
import java.applet.*;
import java.awt.*;
public class ReadString extends Applet{
public static void crash() {
byte[] b = new byte[2];
b[0]=(byte)0xff;
b[1]=(byte)0xfe;
ByteArrayInputStream bais = new ByteArrayInputStream(b);
String s;
InputStreamReader isr= null;
try{
isr = new InputStreamReader(bais,"Unicode");
}
catch (java.io.UnsupportedEncodingException e) { e.printStackTrace(); }
BufferedReader in = new BufferedReader( isr );
try {
while ( (s = in.readLine()) != null ) { System.out.println( s );}
}
catch (java.io.IOException e) { e.printStackTrace(); }
}
public void paint(Graphics g) {
crash();
}
public static void main(String[] a) {
crash();
}
}
---------- END SOURCE ----------
(Review ID: 185057)
======================================================================
- duplicates
-
JDK-6292315 unexpected exception occurs in InputStreamReader
-
- Resolved
-