MOTHBALLED-graphviz
MOTHBALLED-graphviz copied to clipboard
edgepaint failure with record ports
When a node with multiple ports has > 1 edge going out of it, edgepaint crashes with a segmentation fault (no error is emitted).
Minimal test case:
digraph G {
a [shape=record; label="<a> a|<b> b"];
b;
a:a -> b;
a:b -> b;
}
Creating a single edge (starting from any port) works as intended.
I think this is covered under the BUGS section in the man page:
BUGS At present, edgepaint does not handle graphs with loops or directed multiedges. So, a graph with edges a -> b and b -> a is acceptable, but not if it has edges a -> b and a -> b or a -- b and a -- b.
On Tue, Jul 26 2016, John Ellson wrote:
I think this is covered under the BUGS section in the man page:
BUGS At present, edgepaint does not handle graphs with loops or directed multiedges. So, a graph with edges a -> b and b -> a is acceptable, but not if it has edges a -> b and a -> b or a -- b and a -- b.
Is this the case?
A port is a virtual node, so it should count as if a1 -> b, a2 -> b.
Actually, that is true; using ports should not cause a problem unless the node+port is repeated. Unfortunately, the current implementation ignores ports and relies solely on nodes and edges, so that is reflected in the check. By the way, the program firsts checks for ports or multiedges and, if any exist, it prints a warning and moves on. There was a bug in printing the warning which may have caused seg fault. It has now been fixed.
As for allowing ports, that will fall under a feature request.
Thanks for fixing the warning. I had dig with gdb to understand what was going on.
And yes, it would be nice if this would be implemented in edgepaint. Record nodes are very useful in many scenarios where precise and/or compact layout is desired.