Truffle: [NodeUtil.findFirstNodeInstance(..) + SpecializationNode.next]: NullPointerException!!
Mohaned Y Qunaibit
mqunaibi at uci.edu
Sat Jun 6 22:47:24 UTC 2015
Hi,
While I was merging the new changes on Graal+Truffle for ZipPy, I got null
pointer exception when calling NodeUtil.findFirstNodeInstance(..) function.
The problem is related to the SpecializationNode.next child. Since next is
the only child of the uninitialized node NodeClass().getChildren() returns
a list with null child and cause this issue.
More specifically when fetching
*childFields[0].getObject(UninitializedNode_);*
NodeClass.java: 215
private Node nodeAt(int idx) {
int nodeCount = childFields.length;
if (idx < nodeCount) {
return (Node) *childFields[idx].getObject(node);*
} else {
for (NodeFieldAccessor childrenField : childrenFields) {
Object[] nodeArray = (Object[])
childrenField.getObject(node);
if (idx < nodeCount + nodeArray.length) {
return (Node) nodeArray[idx - nodeCount];
}
nodeCount += nodeArray.length;
}
}
return null;
}
Any idea on how to fix/avoid it?
Best,
Mohaned Qunaibit
More information about the graal-dev
mailing list