Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002434graphvizNeatopublic2014-03-18 07:182014-03-19 11:19
ReporterJonnyJD 
Assigned Toerg 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSArch LinuxOS Version-
Summary0002434: neato -n2 crashes on certain input (4 node example)
DescriptionI 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
(gdb) bt
#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)
    at gvlayout.c:85
0000009 0x0000000000400fbf in main (argc=<optimized out>, argv=<optimized out>)
    at dot.c:191

(Also crashes without using gdb)

code at postproc.c:572 in my checkout (current git, see version):
 free(objs);
Steps To Reproduceneato -n2 neato_crash.gv
Additional InformationEvery 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".
Tagsneato, segmentation fault
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.37.0 (20140318.1032); rev. 3bb661e
Attached Files? file icon neato_crash.gv (Attachment missing)
log file icon valgrind.log (Attachment missing)

- Relationships

-  Notes
User avatar (0000710)
JonnyJD (reporter)
2014-03-18 07:19

I should note: this doesn't crash only in current git.

I found the problem using graphviz 2.34.0
User avatar (0000711)
JonnyJD (reporter)
2014-03-18 12:55

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:
https://github.com/ellson/graphviz/pull/16 [^]
User avatar (0000713)
JonnyJD (reporter)
2014-03-18 17:39

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.
User avatar (0000714)
erg (administrator)
2014-03-19 11:19

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.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker