'dump'ing or 'print'ing a class instance or its members causes a fatal
crash.
This bug is a generalization and simplification of a part of bug 4024537.
This customer's information is provided in the customer call section.
---------------- test prog -----------------
class tt {
public int aa = 11;
void foo(int yy) {
int zz = 55;
System.out.println("hello");
}
public static void main(String argv[]) {
(new tt()).foo(99);
System.out.println("goodbye");
}
}
---------------- test output -----------------
% jdb tt
Initializing jdb...
0xee320980:class(tt)
> stop in tt.foo
Breakpoint set in tt.foo
> run
run tt
Breakpoint hit: tt.foo (tt:6)
main[1] running ...
main[1] list
2 public int aa = 11;
3
4 void foo(int yy) {
5 int zz = 55;
6 => System.out.println("hello");
7 }
8
9 public static void main(String argv[]) {
10 (new tt()).foo(99);
main[1] print yy
yy = 99
main[1] print zz
"zz" is not a valid field of (tt)0xee320520
"zz" is not a valid id or class name.
main[1] print aa
The communications channel closed.
Internal exception:
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java)
at sun.tools.debug.RemoteAgent.readValue(RemoteAgent.java:256)
at sun.tools.debug.RemoteAgent.getSlotValue(RemoteAgent.java:815)
at sun.tools.debug.RemoteField.getValue(RemoteField.java:57)
at sun.tools.debug.RemoteObject.getFieldValue(RemoteObject.java:97)
at sun.tools.ttydebug.TTY.print(TTY.java:1072)
at sun.tools.ttydebug.TTY.print(TTY.java:1033)
at sun.tools.ttydebug.TTY.executeCommand(TTY.java:1216)
at sun.tools.ttydebug.TTY.<init>(TTY.java:1359)
at sun.tools.ttydebug.TTY.main(TTY.java:1436)
Internal exception: java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java)
at java.io.DataInputStream.readUTF(DataInputStream.java)
at java.io.DataInputStream.readUTF(DataInputStream.java)
at sun.tools.debug.RemoteAgent.getThreadName(RemoteAgent.java:619)
at sun.tools.debug.RemoteThread.getName(RemoteThread.java:45)
at sun.tools.ttydebug.TTY.printPrompt(TTY.java:70)
at sun.tools.ttydebug.TTY.<init>(TTY.java:1344)
at sun.tools.ttydebug.TTY.main(TTY.java:1436)
%
crash.
This bug is a generalization and simplification of a part of bug 4024537.
This customer's information is provided in the customer call section.
---------------- test prog -----------------
class tt {
public int aa = 11;
void foo(int yy) {
int zz = 55;
System.out.println("hello");
}
public static void main(String argv[]) {
(new tt()).foo(99);
System.out.println("goodbye");
}
}
---------------- test output -----------------
% jdb tt
Initializing jdb...
0xee320980:class(tt)
> stop in tt.foo
Breakpoint set in tt.foo
> run
run tt
Breakpoint hit: tt.foo (tt:6)
main[1] running ...
main[1] list
2 public int aa = 11;
3
4 void foo(int yy) {
5 int zz = 55;
6 => System.out.println("hello");
7 }
8
9 public static void main(String argv[]) {
10 (new tt()).foo(99);
main[1] print yy
yy = 99
main[1] print zz
"zz" is not a valid field of (tt)0xee320520
"zz" is not a valid id or class name.
main[1] print aa
The communications channel closed.
Internal exception:
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java)
at sun.tools.debug.RemoteAgent.readValue(RemoteAgent.java:256)
at sun.tools.debug.RemoteAgent.getSlotValue(RemoteAgent.java:815)
at sun.tools.debug.RemoteField.getValue(RemoteField.java:57)
at sun.tools.debug.RemoteObject.getFieldValue(RemoteObject.java:97)
at sun.tools.ttydebug.TTY.print(TTY.java:1072)
at sun.tools.ttydebug.TTY.print(TTY.java:1033)
at sun.tools.ttydebug.TTY.executeCommand(TTY.java:1216)
at sun.tools.ttydebug.TTY.<init>(TTY.java:1359)
at sun.tools.ttydebug.TTY.main(TTY.java:1436)
Internal exception: java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java)
at java.io.DataInputStream.readUTF(DataInputStream.java)
at java.io.DataInputStream.readUTF(DataInputStream.java)
at sun.tools.debug.RemoteAgent.getThreadName(RemoteAgent.java:619)
at sun.tools.debug.RemoteThread.getName(RemoteThread.java:45)
at sun.tools.ttydebug.TTY.printPrompt(TTY.java:70)
at sun.tools.ttydebug.TTY.<init>(TTY.java:1344)
at sun.tools.ttydebug.TTY.main(TTY.java:1436)
%
- duplicates
-
JDK-4024537 jdb has problems working with Java Beans
- Closed
-
JDK-4035903 jdb "dump" command does not work
- Closed
-
JDK-4035911 jdb "dump" command crashes java
- Closed
- relates to
-
JDK-4031082 sun.tools.debug.RemoteClass.getFieldValue crashes
- Closed