|Anonymous | Login||2017-11-19 05:28 EST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002434||graphviz||Neato||public||2014-03-18 07:18||2014-03-19 11:19|
|Platform||x86_64||OS||Arch Linux||OS Version||-|
|Summary||0002434: neato -n2 crashes on certain input (4 node example)|
|Description||I am running "neato -n2" on a graph with fixed node positions and one edge position. neato segfaults with this gdb backtrace:|
Program received signal SIGABRT, Aborted.
0x00007ffff75b5319 in raise () from /usr/lib/libc.so.6
#0 0x00007ffff75b5319 in raise () from /usr/lib/libc.so.6
0000001 0x00007ffff75b6718 in abort () from /usr/lib/libc.so.6
0000002 0x00007ffff75f2da4 in __libc_message () from /usr/lib/libc.so.6
0000003 0x00007ffff75f856e in malloc_printerr () from /usr/lib/libc.so.6
0000004 0x00007ffff75f9247 in _int_free () from /usr/lib/libc.so.6
0000005 0x00007ffff7b83810 in addXLabels (gp=0x667080) at postproc.c:572
0000006 gv_postprocess ([email protected]=0x667080,
[email protected]=0) at postproc.c:600
0000007 0x00007fffede6a481 in neato_layout (g=0x667080) at neatoinit.c:1422
0000008 0x00007ffff7b63182 in gvLayoutJobs (gvc=0x603760, g=0x667080)
0000009 0x0000000000400fbf in main (argc=<optimized out>, argv=<optimized out>)
(Also crashes without using gdb)
code at postproc.c:572 in my checkout (current git, see version):
|Steps To Reproduce||neato -n2 neato_crash.gv|
|Additional Information||Every line in the gv/dot example is relevant. Removing one doesn't crash anymore then.|
This is the minified example. I encountered the problem in a bigger graph.
You can have a look at the situation with removing this line:
1 -> 0 [label="d"];
and then doing something like "neato -n2 -Tpng neato_nocrash.gv -o neato_nocrash.png".
|Tags||neato, segmentation fault|
|VERSION||2.37.0 (20140318.1032); rev. 3bb661e|
|Attached Files|| neato_crash.gv (Attachment missing)|
valgrind.log (Attachment missing)
I should note: this doesn't crash only in current git.
I found the problem using graphviz 2.34.0
Not sure what the root cause of this is (except that somehow that one edge doesn't get a position in the layout), but I fixed the crash (and print a warning to stderr instead).
The patch is in:
I found the cause:
My example had a spline given between two nodes for one direction, but not the other. The edge with the spline given was also first in the sorting (the other way around also is no problem).
So equivEdge() clustered two edges together and was supposed to creata a multi spline with the leader (and nothing for the rest of that "cluster").
This doesn't work in this case, since the leader shortcuts the process because Nop > 1 and a spline is given.
The effect is that the second edge between these two nodes doesn't have an edge, which than also led to the segfault I fixed separately.
The patch/commit with the fix is also in the pull request on GitHub.
|The code didn't handle the case where one edge in a multiedge set already had a layout. Fix provided by JonnyJD and merged in. Thanks.|
|2014-03-18 07:18||JonnyJD||New Issue|
|2014-03-18 07:18||JonnyJD||File Added: neato_crash.gv|
|2014-03-18 07:19||JonnyJD||Note Added: 0000710|
|2014-03-18 07:20||JonnyJD||Tag Attached: neato|
|2014-03-18 07:20||JonnyJD||Tag Attached: segmentation fault|
|2014-03-18 09:29||JonnyJD||File Added: valgrind.log|
|2014-03-18 12:55||JonnyJD||Note Added: 0000711|
|2014-03-18 17:39||JonnyJD||Note Added: 0000713|
|2014-03-19 11:19||erg||Note Added: 0000714|
|2014-03-19 11:19||erg||Assigned To||=> erg|
|2014-03-19 11:19||erg||Status||new => resolved|
|2014-03-19 11:19||erg||Resolution||open => fixed|
|MantisBT 1.2.5[^] Copyright © 2000 - 2011 MantisBT Group|