Number: 2118
Title: cluster and rank causes abort
Submitter: Ben Smith
Date: Wed Jan 26 17:47:56 2011
Subsys: Dot
Version: 2.26.3
System: x86-Linux-Fedora 12
Severity: major
Problem:
A dot file I'm using works under 2.20.3 but causes "Aborted (core dumped)" on 2.26.3.

I noticed that changing the number of letters in the A_1 record label or removing the rank changes whether dot crashes or not.
Input:

digraph G
{
    A_1:a -> A_2:a;

	subgraph clusterA
	{
    	A_1 [shape=record,label="{<a>AAAAAA|CCC}"];
		A_2 [shape=record,label="{<a>A|BB}"];

        {rank=same; A_1; A_2;}
	}
}
Comments:
Here's a version of the graph that does not crash:

digraph G
{
    A_1:a -> A_2:a;

subgraph clusterA { A_1 [shape=record,label="{<a>AAAA|CCC}"]; A_2 [shape=record,label="{<a>A|BB}"];

{rank=same; A_1; A_2;} } }

Comments: [erg] This doesn't abort on osx but the output is still wrong. The problem appears to pre-date 2.24.

A workaround to consider is to use HTML-like labels. For example,


   A_1 [shape=none,label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD port="a">AAAAAA</TD></TR>
<TR><TD>CCC</TD></TR></TABLE>>]
Being XML-based, it is not as elegant as the record syntax, but it is more extensible.

[ben] Thanks for responding to my bug report so quickly. That works great and forced me to try out the HTML labels, which I now understand the power of.
Owner: *
Status: *