lingua-franca
lingua-franca copied to clipboard
Diagram generation fails with "Failed to perform diagram layout."
Failed to perform diagram layout.
The source or the target of edge ElkEdge ElkPort (0.0,0.0 | 0.0,0.0) -> ElkNode "main_f_f" (0.0,0.0 | 0.0,0.0) could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.
Screenshot:
LF source:
target C;
reactor E {
output out:int;
reaction(startup) {=
=}
}
reactor F {
input in:int;
input in2:int;
input in3:int;
output out:int;
reaction(in2) -> out {=
=}
reaction(in3) -> out {=
=}
reaction(in) -> out {==}
}
reactor Sender {
input in:int;
reaction(in) {==}
reaction(in) {==}
}
reactor Receiver {
output out:int;
input in:int;
logical action a;
reaction(a, in) -> out {=
if (a->is_present) {
// Do stuff.
}
=}
}
reactor Fproxy {
input in:int;
output out:int;
s = new Sender();
in -> s.in;
r = new Receiver();
r.out -> out;
f = new F();
in -> f.in;
f.out -> r.in;
}
reactor G {
input in:int;
output out:int;
reaction(startup) -> out {==}
reaction(in) {==}
}
main reactor {
f = new Fproxy();
g = new G();
f.out -> g.in;
g.out -> f.in;
}
I cannot reproduce this issue in ELK 0.8.1 nor in ELK 0.7.1 (which you are currently using) on your main branch.
Are you using a specific release?
What exactly are you expanding/collapsing/adding to the model to reproduce the issue?
Mine looks a little different than the diagram I see in the screenshot:
I found a way to reproduce the issue: Remove everything inside reactor F, then add it again, the diagram looks like this:
Trying to open F after that results in the error above.
For me, that looks like an issue with incremental update. @a-sr Are you familiar with this kind of issues?
I fixed it by refreshing the diagram (the left-most arrows in the diagram toolbar) and I suggest doing the same if such issues occur.
Yes, looks like a hiccup in the incremental update of the diagram, especially if it is disappears upon refreshing the diagram.