Number: 1772
Title: Abort trap from rank=same with some edge listing orders
Submitter: Jeremy Douglass
Date: Mon Sep 21 04:13:47 2009
Subsys: Dot
Version: 2.24.0
System: x86-OSX-10.5.8
Severity: major
Problem:
Using dot on a graph with rank=same causes an "Abort trap".

Command:

dot -v -Tpng alternatives-test2.dot -otest2.png

Changing the order in which edges are defined works around the problem (when rank=same for 7, 8, introduct 7->foo, 8->foo before either 7->8 or 8->7).

It is also possible to work around the problem by combinations of simplifying the graph (removing edges from the top or bottom of the list) AND moving the rank=same command to the bottom.

Other bugs have described related rank=same problems, and for given short files suggest fixes such as moving the rank=same command to the bottom. I factored my file down to a 5-node cluster, and this worked for the cluster -- however it did not work for the full file when there were more edges / weights present. This is why I submitted this bug with a more complex example, to show that this behaves more like the complex interaction of two bugs.

TRANSCRIPT:


$ dot -v -Tpng alternatives-test2.dot -otest2.png
dot - graphviz version 2.24.0 (20090616.2323)
Activated plugin library: libgvplugin_pango.6.dylib
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Using render: cairo:cairo
Using device: png:cairo:cairo
The plugin configuration file:
	/opt/local/lib/graphviz/config6
		was successfully loaded.
    render	:  cairo dot fig gd map ps quartz svg tk vml vrml xdot
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork twopi
    textlayout	:  textlayout
    device	:  bmp canon cgimage cmap cmapx cmapx_np dia dot eps exr fig gd gd2 gif gv hpgl imap imap_np ismap jp2 jpe jpeg jpg mif mp pcl pct pdf pic pict plain plain-ext png ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz vrml vtx wbmp x11 xdot xlib
    loadimage	:  (lib) bmp eps gd gd2 gif jpe jpeg jpg pdf png ps svg xbm
fontname: "Times-Roman" resolved to: (ps:pango  Times) (PangoCairoFcFont) "Times, Regular" *no pathname available*
network simplex:  17 nodes 24 edges maxiter=2147483647 balance=1
network simplex: 17 nodes 24 edges 0 iter 0.00 sec
mincross: pass 0 iter 0 trying 0 cur_cross 3 best_cross 3
mincross: pass 0 iter 1 trying 0 cur_cross 2 best_cross 2
mincross: pass 0 iter 2 trying 1 cur_cross 2 best_cross 2
mincross: pass 0 iter 3 trying 2 cur_cross 2 best_cross 2
mincross: pass 1 iter 0 trying 0 cur_cross 1 best_cross 1
mincross: pass 1 iter 1 trying 1 cur_cross 1 best_cross 1
mincross: pass 1 iter 2 trying 2 cur_cross 1 best_cross 1
mincross: pass 1 iter 3 trying 3 cur_cross 1 best_cross 1
mincross: pass 2 iter 0 trying 0 cur_cross 1 best_cross 1
mincross: pass 2 iter 1 trying 1 cur_cross 1 best_cross 1
mincross: pass 2 iter 2 trying 2 cur_cross 1 best_cross 1
mincross: pass 2 iter 3 trying 3 cur_cross 1 best_cross 1
mincross: pass 2 iter 4 trying 4 cur_cross 1 best_cross 1
mincross: pass 2 iter 5 trying 5 cur_cross 1 best_cross 1
mincross: pass 2 iter 6 trying 6 cur_cross 1 best_cross 1
mincross: pass 2 iter 7 trying 7 cur_cross 1 best_cross 1
mincross: pass 2 iter 8 trying 8 cur_cross 1 best_cross 1
mincross CYOA: 1 crossings, 0.00 secs.
network simplex:  79 nodes 109 edges maxiter=2147483647 balance=2
network simplex: 79 nodes 109 edges 13 iter 0.00 sec
Abort trap

Input file: b1772.dot
Fix:

Clearly defined ways to keep this example from breaking:

1) define 7->8 BELOW 8->10 2) delete the last edges from 16->18 on 3) delete the first three edges up through 2->16 AND move the rank=same command to the bottom

.. note that merely moving the rank = same command to the bottom doesn't work. Also, adding and removing edges from the beginning and the end of the graph seems to trigger the problem unpredictably (weight based?). The only reliable fix seems to be to introduce 7 -> 10 and 7->10 before linking either 7->8 and 8->7. However my edges are going to be drawn out of recordsets -- I'd prefer to write definitions around listing edges in node order if possible.
Owner: *
Status: *