Closed GoogleCodeExporter closed 9 years ago
The code to find the correct guardString for a transition causes a
StackOverflowError due to endless recursion.
java.lang.StackOverflowError
at java.util.HashMap.resize(HashMap.java:581)
at java.util.HashMap.addEntry(HashMap.java:879)
at java.util.HashMap.put(HashMap.java:505)
at cruise.umple.compiler.JavaGenerator.initializeLangaugeBasedVariables(JavaGenerator.java:2497)
at cruise.umple.compiler.SuperCodeGenerator.<init>(SuperCodeGenerator.java:45)
at cruise.umple.compiler.JavaGenerator.<init>(JavaGenerator.java:36)
at cruise.umple.compiler.StateTableRow.extractGuardString(Generator_CodeStateTables.ump:227)
at cruise.umple.compiler.StateTableRow.extractGuardString(StateTableRow.java:421)
at cruise.umple.compiler.StateTableRow.extractGuardString(StateTableRow.java:421)
at cruise.umple.compiler.StateTableRow.extractGuardString(StateTableRow.java:421)
at cruise.umple.compiler.StateTableRow.extractGuardString(StateTableRow.java:421)
Original comment by CraigBry...@gmail.com
on 1 Mar 2015 at 4:41
After some trial and error, I believe this occurs when a guarded transition
exists in a sub-sub-state (a doubly nested state). Transitions with guards in
more deeply nested states also have this error.
Here's a simple example:
class A {
boolean guard;
sm {
First{ ev1 -> Second; }
Second{ a{ b{ ev1[guard] -> First; } } }
}
}
Interestingly, this code (with only a singly nested state) doesn't cause the
error.
class A {
boolean guard;
sm {
First{ ev1 -> Second; }
Second{ a{ ev1[guard] -> First; } }
}
}
Original comment by CraigBry...@gmail.com
on 1 Mar 2015 at 4:58
This issue was closed by revision r5169.
Original comment by CraigBry...@gmail.com
on 2 Mar 2015 at 2:34
Original issue reported on code.google.com by
CraigBry...@gmail.com
on 28 Feb 2015 at 3:39