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 the resolving phase, if a JavaObject is found whose class does not exist, snapshot.addFakeInstanceClass is called to create a fake class for it. This method adds the fake class to Snapshot.heapObjects, which is being iterated over in Snapshot.resolve. Thus, the next step of the for loop throws a ConcurrentModificationException and dies.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
I used the following code in Snapshot.resolve. It's very hacky, but I was able to get my file loaded.
// Now, resolve everything else.
for (Iterator it=heapObjects.values().iterator(); it.hasNext();)
{
JavaHeapObject t=null;
try {
t=(JavaHeapObject)it.next();
} catch (ConcurrentModificationException e) {
System.out.println("Restarting iteration");
it=heapObjects.values().iterator();
t=(JavaHeapObject)it.next();
}
if (!(t instanceof JavaClass)) {
t.resolve(this);
}
}
I also added the line
if (clazz instanceof JavaClass) { return; }
as the first line of JavaObject.resolve and JavaObjectArray.resolve.