team-worthwhile/worthwhile — Issue #30: Stack overflow when validating very complex programs
Author: jspam
Created: 2012-02-13 18:56:37+00:00
State: open
Labels: ui

When validating the test program ```T01b_VerschachteltesProgramm```, which contains 1,000 nested while loops, occasionally a stack overflow error would occur:

This could not always be reproduced. Maybe the stack size could be increased, but then again, who nests 1,000 loops?

```
1 [Worker-10] ERROR org.eclipse.xtext.validation.CompositeEValidator - Error executing EValidator
java.lang.RuntimeException: java.lang.StackOverflowError
at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:124)
at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:290)
at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:62)
at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:126)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:165)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:180)

[snip]

at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:168)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:184)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
Caused by: java.lang.StackOverflowError
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:19)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:237)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Loop.accept(Loop.java:260)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:122)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Block.accept(Block.java:96)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeBottomUpVisitor.visit(ASTNodeBottomUpVisitor.java:20)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:302)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.HierarchialASTNodeVisitor.visit(HierarchialASTNodeVisitor.java:102)
at edu.kit.iti.formal.pse.worthwhile.model.ast.Assignment.accept(Assignment.java:222)
at edu.kit.iti.formal.pse.worthwhile.model.ast.visitor.ASTNodeReturnVisitor.apply(ASTNodeReturnVisitor.java:46)
at edu.kit.iti.formal.pse.worthwhile.validation.WorthwhileJavaValidator.checkFunctionParametersNotModified(WorthwhileJavaValidator.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:108)
at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:290)
at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:62)
at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:126)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:165)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:180)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:168)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)

[snip]

at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:184)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:168)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:180)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:168)
```