Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error in Eclipse #17

Closed
rudi opened this issue Aug 6, 2016 · 2 comments
Closed

Runtime error in Eclipse #17

rudi opened this issue Aug 6, 2016 · 2 comments
Labels

Comments

@rudi
Copy link
Member

rudi commented Aug 6, 2016


Author Name: Volker Stolz (Volker Stolz)
Original Redmine Issue: 85, https://envisage.ifi.uio.no:8080/redmine/issues/85
Original Date: 2013-11-13
Original Assignee: Volker Stolz


For some variable declarations there's a runtime exception in Eclipse that is usually hidden, resulting in an UnresolvedTypeUse:

java.lang.RuntimeException: Trying to evaluate attribute in subtree not attached to main tree
    at abs.frontend.ast.CompilationUnit.lookupModule(CompilationUnit.java:1298)
    at abs.frontend.ast.CompilationUnit.Define_ModuleDecl_lookupModule(CompilationUnit.java:1354)
    at abs.frontend.ast.ASTNode.Define_ModuleDecl_lookupModule(ASTNode.java:1662)
    at abs.frontend.ast.ModuleDecl.lookupModule(ModuleDecl.java:1515)
    at abs.frontend.typechecker.TypeCheckerHelper.getImportedNames(TypeCheckerHelper.java:279)
    at abs.frontend.ast.ModuleDecl.getImportedNames_compute(ModuleDecl.java:1280)
    at abs.frontend.ast.ModuleDecl.getImportedNames(ModuleDecl.java:1267)
    at abs.frontend.typechecker.TypeCheckerHelper.getVisibleNames(TypeCheckerHelper.java:310)
    at abs.frontend.ast.ModuleDecl.getVisibleNames_compute(ModuleDecl.java:1088)
    at abs.frontend.ast.ModuleDecl.getVisibleNames(ModuleDecl.java:1075)
    at abs.frontend.ast.ModuleDecl.resolveName(ModuleDecl.java:385)
    at abs.frontend.ast.ModuleDecl.lookup_compute(ModuleDecl.java:1494)
    at abs.frontend.ast.ModuleDecl.lookup(ModuleDecl.java:1481)
    at abs.frontend.ast.ModuleDecl.Define_Decl_lookup(ModuleDecl.java:1604)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.ASTNode.Define_Decl_lookup(ASTNode.java:1669)
    at abs.frontend.ast.TypedVarOrFieldDecl.lookup(TypedVarOrFieldDecl.java:327)
    at abs.frontend.ast.TypedVarOrFieldDecl.Define_Decl_lookup(TypedVarOrFieldDecl.java:342)
    at abs.frontend.ast.Exp.lookup(Exp.java:438)
    at abs.frontend.ast.TypeUse.getDecl_compute(TypeUse.java:393)
    at abs.frontend.ast.TypeUse.getDecl(TypeUse.java:381)
    at abs.frontend.ast.UnresolvedTypeUse.rewriteTo(UnresolvedTypeUse.java:365)
    at abs.frontend.ast.ASTNode.getChild(ASTNode.java:606)
    at abs.frontend.ast.ASTNode.collect_contributors_Stmt_getAACs(ASTNode.java:1098)
    at abs.frontend.ast.ASTNode.collect_contributors_Stmt_getAACs(ASTNode.java:1098)
    at abs.frontend.ast.Stmt.collect_contributors_Stmt_getAACs(Stmt.java:351)
    at abs.frontend.ast.Stmt.getAACs_compute(Stmt.java:618)
    at abs.frontend.ast.Stmt.getAACs(Stmt.java:587)
    at abs.frontend.ast.Stmt.rewriteTo(Stmt.java:529)
    at abs.frontend.ast.VarDeclStmt.rewriteTo(VarDeclStmt.java:578)
    at abs.frontend.ast.ASTNode.getChild(ASTNode.java:606)
    at abs.frontend.ast.List.rewriteTo(List.java:287)
    at abs.frontend.ast.ASTNode.getChild(ASTNode.java:606)
    at abs.frontend.ast.Block.getStmtList(Block.java:600)
    at abs.frontend.ast.Block.getNumStmt(Block.java:540)
    at abs.frontend.ast.Block.hasRewriteBlockAt(Block.java:86)
    at abs.frontend.ast.Block.rewriteTo(Block.java:812)
    at abs.frontend.ast.ASTNode.getChild(ASTNode.java:606)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:40)
    at abs.frontend.parser.SourcePosition.findPosition(SourcePosition.java:34)
    at org.absmodels.abs.plugin.util.UtilityFunctions.getASTNodeOfOffset(UtilityFunctions.java:373)
    at org.absmodels.abs.plugin.editor.ABSCodeScanner.evalAST(ABSCodeScanner.java:306)
    at org.absmodels.abs.plugin.editor.ABSCodeScanner.internalNextToken(ABSCodeScanner.java:259)
    at org.absmodels.abs.plugin.editor.ABSCodeScanner.nextToken(ABSCodeScanner.java:230)
    at org.eclipse.jface.text.rules.DefaultDamagerRepairer.createPresentation(DefaultDamagerRepairer.java:175)

@rudi
Copy link
Member Author

rudi commented Aug 6, 2016


Original Redmine Comment
Author Name: Volker Stolz (Volker Stolz)
Original Date: 2013-11-26T11:07:16Z


Regression: https://envisage.ifi.uio.no:8080/jenkins/job/ABS-Bucky-Tests/52/testReport/abs.AllTests$abs.frontend.AllFrontendTests$abs.frontend.parser/BackPositionTest/test6/

@rudi
Copy link
Member Author

rudi commented Aug 6, 2016


Original Redmine Comment
Author Name: Volker Stolz (Volker Stolz)
Original Date: 2013-11-26T16:57:38Z


Fix in place, let's see how it holds up.

@rudi rudi closed this as completed Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant