-
Enhancement
-
Resolution: Fixed
-
P3
-
1.4.0, 1.4.1, 1.4.2, 1.4.2_11, 5.0
-
b01
-
generic, x86, sparc
-
generic, linux, solaris_2.6, solaris_9, windows_2000
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2120658 | 5.0 | John Rose | P3 | Resolved | Fixed | beta2 |
JDK-2120657 | 1.4.2_05 | John Rose | P3 | Closed | Fixed | 05 |
Date: Wed, 17 Nov 1999 17:44:17 PST
From: Tom Rodriguez <###@###.###>
Organization: Xerox PARC
To: Steffen Grarup <###@###.###>
Occasionally I get exceptions like this from hotspot:
8 C:/projects # java test
Exception in thread "main" java.lang.NullPointerException
<<no stack trace available>>
which should look like this:
9 C:/projects # java -Xint test
Exception in thread "main" java.lang.NullPointerException
at java.lang.System.arraycopy(Native Method)
at test.t(test.java:17)
at test.main(test.java:10)
It seems like once code is compiled you can't get accurate backtraces
from System.arraycopy, which is quite annoying. This seems to be a bug
only in the server VM. The client VM doesn't have this problem. Here's
a test program for it. Just an FYI.
tom
public class test {
static Object[] src = new Object[10];
static Object[] dest1 = new Object[10];
static Object[] dest2 = null;
static int count = 100000;
public static void main(String[] args) {
t(false);
t(true);
}
public static void t(boolean n) {
for (int i = 0; i < count; i++) {
if (n && (i + 1 == count))
System.arraycopy(src, 0, dest2, 0, src.length);
else
System.arraycopy(src, 0, dest1, 0, src.length);
}
}
}
==========================================================================
This issue still happens with 1.4.1-beta-b12.
The following messages are the result when we tried the above attached
program with windows2000(SP2).
M:\shares\no-trace-server>java test
Exception in thread "main" java.lang.NullPointerException
at java.lang.System.arraycopy(Native Method)
at test.t(test.java:16)
at test.main(test.java:10)
M:\shares\no-trace-server>java -Xint test
Exception in thread "main" java.lang.NullPointerException
at java.lang.System.arraycopy(Native Method)
at test.t(test.java:16)
at test.main(test.java:10)
M:\shares\no-trace-server>java -server test
Exception in thread "main" java.lang.NullPointerException
This is very inconvenient. Even if some error occurs, the licensee can not
do anything.
There might be the following opinion,
"when debugging, use -client(default) first and debug all errors.
After debugging, apply the application to he real system with -server
option."
However, the server VM is very different from the client VM.
There is the error which happens only with server option.
Against such error, they can not do anything....
Please reconsider to add the trace feature to -sever option
and look at their comment in "COMMENT"
2002-05-22
==========================================================================
- backported by
-
JDK-2120658 NullPointerException with no stack trace
- Resolved
-
JDK-2120657 NullPointerException with no stack trace
- Closed
- duplicates
-
JDK-6432085 Stack Trace does not show up on NullPointerException in 1.4.2 (-server VM)
- Closed
-
JDK-4962416 Server Compiler Crash in parser
- Closed
-
JDK-4966410 Stacktrace missing from NullPointerException
- Closed
- relates to
-
JDK-4761344 NullPointerException just before data loss
- Resolved
-
JDK-5098422 NPE with no stack Trace: Enable -XX:-OmitStackTraceInFastThrow for 1.4.2
- Resolved
-
JDK-6678999 Stacktrace missing after null string comparisons
- Closed
-
JDK-6326935 Exception message's size is more than doubled everytime an exception is thrown
- Resolved
-
JDK-8169685 C2: ClassCastException with empty message
- Closed
-
JDK-8273392 Improve usability of stack-less exceptions due to -XX:+OmitStackTraceInFastThrow
- In Progress
-
JDK-8073432 Object.getClass() throws stackless NPE, due to C2 intrinsic
- Resolved