I am trying to run JPF and encountered a following null pointer exception.
java.lang.NullPointerException at gov.nasa.jpf.vm.ThreadInfo$StackTraceElement.createJPFStackTraceElement(ThreadInfo.java:1671)
The code that is corresponds to is:
int createJPFStackTraceElement() {
if (ignore) {
return MJIEnv.NULL;
} else {
Heap heap = vm.getHeap();
ClassInfo ci = ClassLoaderInfo.getSystemResolvedClassInfo("java.lang.StackTraceElement");
ElementInfo ei = heap.newObject(ci, ThreadInfo.this);
ei.setReferenceField("clsName", heap.newString(clsName, ThreadInfo.this).getObjectRef());
ei.setReferenceField("mthName", heap.newString(mthName, ThreadInfo.this).getObjectRef());
ei.setReferenceField("fileName", heap.newString(fileName, ThreadInfo.this).getObjectRef()); //line 1671
ei.setIntField("line", line);
return ei.getObjectRef();
}
}
there are two ways