-
Notifications
You must be signed in to change notification settings - Fork 353
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
Error when generating graph #65
Comments
We guess it has to do with the labels on arrows. Also issue #54 will work if you remove the labels. |
It looks like it is one label in particular causes the issue. I changed the color of the edge on the graph to red so you can see it better when the graph is generated. digraph unix {
sh0045->sh0020[arrowtail=none,arrowhead=none,color="#0000CC"];
subgraph cluster4p0 {
label="";
subgraph cluster4 {
style=solid;
color="#000004";
label=<<TABLE BGCOLOR="#000005" FIXEDSIZE="TRUE" WIDTH="112" HEIGHT="12"><TR><TD></TD></TR></TABLE>>;
subgraph cluster4p1 {
label="";
sh0006 [shape=rect,label="",width=1.250000,height=0.661241,color="#000006"];
sh0007 [shape=rect,label="",width=1.208333,height=0.661241,color="#000007"];
sh0008 [shape=rect,label="",width=1.069444,height=0.661241,color="#000008"];
}
}
}
sh0042->sh0020[arrowtail=none,arrowhead=none,minlen=1,color="#00003C"];
sh0016->sh0008[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000044",label=<<TABLE BGCOLOR="#000045" FIXEDSIZE="TRUE" WIDTH="169" HEIGHT="18"><TR><TD></TD></TR></TABLE>>];
sh0016->sh0020[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000048",label=<<TABLE BGCOLOR="#000049" FIXEDSIZE="TRUE" WIDTH="111" HEIGHT="18"><TR><TD></TD></TR></TABLE>>];
sh0016->sh0033[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#00004C",label=<<TABLE BGCOLOR="#00004D" FIXEDSIZE="TRUE" WIDTH="111" HEIGHT="18"><TR><TD></TD></TR></TABLE>>];
sh0008->sh0013[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000054",label=<<TABLE BGCOLOR="#000055" FIXEDSIZE="TRUE" WIDTH="111" HEIGHT="18"><TR><TD></TD></TR></TABLE>>];
/*HERE---->*/ sh0020->sh0008[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#FF0000"];
sh0007->sh0016[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000060",label=<<TABLE BGCOLOR="#000061" FIXEDSIZE="TRUE" WIDTH="88" HEIGHT="18"><TR><TD></TD></TR></TABLE>>];
} |
Yes, that seems to be the problem. It is the only label in the graph which forces the edge to "bend around" the label. Look on the red edge in the graph: This one doesn't work with viz.js: The workaround is to use xlabel on on edges instead: To replace all "label=" on edges with "xlabel=" is also the workaround for bug #54. Now at least we have some sort of a workaround. But I still hope for a fix in viz.js... |
This appears to not be a problem with generating the graph, but rather when cleaning up after rendering. Here is the stack trace with optimizations and closure compiler turned off and assertions turned on:
A quick test with the Graphviz API from C doesn't appear to have the same issue. So this may have something to do with how Emscripten manages memory. I was able to find a reduced test case, however. As suggested above, the issue seems to depend on the particular layout the engine chooses. digraph g {
node001->node002;
subgraph cluster1 {
node003;
node004;
node005;
}
node006->node002;
node007->node005;
node007->node002;
node007->node008;
node002->node005[label="x"];
node004->node007;
} This graph also throws an exception with Viz.js, and crashes when using the Graphviz API from C: digraph G {
subgraph g {
}
} |
This should be addressed in 2257a40. Viz.js will no longer attempt to clean up in its C code. |
We try to integrate viz.js into plantuml. However, it seems as we get rarely an exception which looks as it has to do with viz.js. The .dot file works with GrapViz dot command line of course.
The following dot file generates an example abort exception:
svek2.txt
Nashorn Exception:
V8 exception:
The text was updated successfully, but these errors were encountered: