Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: X10 2.1.2
-
Fix Version/s: None
-
Component/s: X10 Compiler: Front-end
-
Labels:None
-
Number of attachments :
Description
In my development workspace (using the tools-integration branch), I occasionally get the following 2 exceptions (one NPE and one InternalCompilerError) out of the parse controller and the indexer for Hello.x10. I have not been able to reproduce these reliably, and have not noticed them in a release candidate yet. It would be good to figure out why this is happening. When it happens it is certainly very bad (just creating a project causes these errors because they have a Hello in them).
Notice that the parse controller and indexer use restricted sets of goals from the compiler.
java.lang.NullPointerException
at x10.ast.X10FieldDecl_c.shouldInferType(X10FieldDecl_c.java:351)
at x10.ast.X10MethodDecl_c.typeCheckOverride(X10MethodDecl_c.java:924)
at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
at x10.visit.X10TypeChecker.override(X10TypeChecker.java:76)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:214)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Node_c.visitList(Node_c.java:240)
at x10.ast.X10ClassBody_c.visitChildren(X10ClassBody_c.java:340)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at x10.ast.X10ClassDecl_c.typeCheckBody(X10ClassDecl_c.java:1645)
at x10.ast.X10ClassDecl_c.typeCheckOverride(X10ClassDecl_c.java:775)
at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
at x10.visit.X10TypeChecker.override(X10TypeChecker.java:76)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:214)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Node_c.visitList(Node_c.java:240)
at polyglot.ast.SourceFile_c.visitChildren(SourceFile_c.java:118)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visit(Node_c.java:184)
at polyglot.frontend.ForgivingVisitorGoal.runTask(ForgivingVisitorGoal.java:30)
at polyglot.frontend.Scheduler.runPass(Scheduler.java:349)
at x10.ExtensionInfo$X10Scheduler.runPass(ExtensionInfo.java:1138)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:133)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:75)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:56)
at polyglot.frontend.Scheduler.attempt(Scheduler.java:257)
at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:193)
at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:179)
at polyglot.frontend.Compiler.compile(Compiler.java:269)
at x10dt.ui.parser.CompilerDelegate.compile(CompilerDelegate.java:183)
at x10dt.ui.parser.ParseController.parse(ParseController.java:143)
at org.eclipse.imp.parser.ParseControllerBase.parse(ParseControllerBase.java:71)
at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:92)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
polyglot.util.InternalCompilerError: /Users/mvaziri/Workspaces/wwork2/A/src/Hello.x10:10,9-44: Cannot get MethodDef before type-checking method invocation.
at polyglot.types.ErrorRef_c.get(ErrorRef_c.java:20)
at polyglot.types.Use_c.def(Use_c.java:16)
at polyglot.types.Use_c.def(Use_c.java:5)
at x10dt.search.core.facts.AllMembersFactWriter.visit(AllMembersFactWriter.java:135)
at x10dt.search.core.facts.TypeHierarchyFactWriter.visit(TypeHierarchyFactWriter.java:88)
at x10dt.search.core.pdb.FactWriterVisitor.enter(FactWriterVisitor.java:40)
at polyglot.visit.NodeVisitor.enter(NodeVisitor.java:93)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:245)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Eval_c.visitChildren(Eval_c.java:58)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Node_c.visitList(Node_c.java:240)
at polyglot.ast.AbstractBlock_c.visitChildren(AbstractBlock_c.java:72)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.MethodDecl_c.visitChildren(MethodDecl_c.java:159)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Node_c.visitList(Node_c.java:240)
at x10.ast.X10ClassBody_c.visitChildren(X10ClassBody_c.java:340)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at x10.ast.X10ClassDecl_c.visitChildren(X10ClassDecl_c.java:1554)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:180)
at polyglot.ast.Node_c.visitList(Node_c.java:240)
at polyglot.ast.SourceFile_c.visitChildren(SourceFile_c.java:118)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visit(Node_c.java:184)
at x10dt.search.core.pdb.X10FactGenerator.update(X10FactGenerator.java:345)
at x10dt.search.core.pdb.X10FactGenerator.update(X10FactGenerator.java:150)
at org.eclipse.imp.pdb.indexing.Indexer.run(Indexer.java:667)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
there was a mutable static field in this piece of code that got in there by accident, then we removed it from the trunk & the 2.2 branch. I'd guess that change hadn't made it to the tool integration branch yet.