FULL PRODUCT VERSION :
jdk-6-rc-src-b100-jrl-27_sep_2006
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
In Snapshot.resolve, there is code to attempt to handle the case where the JavaClass for "java.lang.Class" is not found. A stand-in object is created, but field javaLangClass is never assigned a value and is later dereferences (leading to NPE).
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
This works better: (in Snapshot.java, public void resolve(boolean calculateRefs))
if (javaLangClass == null) {
System.out.println("WARNING: hprof file does not include java.lang.Class!");
javaLangClass=new JavaClass("java.lang.Class", 0, 0, 0, 0,
EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
addFakeClass(javaLangClass);
}