Number: 1370
Title: dot crash processing ranksame + cluster
Submitter: Mycroft Holmes
Date: Tue Jun 3 08:57:12 2008
Subsys: Dot
Version: 2.19.20080516.0445
System: x86-OSX-10.5.3
Severity: major
Problem:
This makes dot crash (sometimes immediately, sometimes after a while): note that the graph is planar (so it has a valid layout).


digraph expression0 {
compound= true;
x; z;
subgraph cluster1 {a; b -> c; }
{ rank = same; c; a; }
}

note also that if you move the "ranksame" directive inside the cluster, it works. also dot prints the following diagnostic message:


Warning: a was already in a rankset, ignored in cluster expression0
Warning: c was already in a rankset, ignored in cluster expression0

This makes me think dot is ignoring the declaration of nodes a and c in the cluster and it's trying to define them in the main graph, so when it processes the link b->c it goes in access violation because c does not exist in its data structure. as a cross proof, this works:

subgraph cluster1 { a; b -> d; c; }

a and c are somehow incorrectly removed from the cluster (but in the picture, they are in!); since there's no edge that touches them, dot does not crash.

(I also deduce that the ranksame declaration CAN be positioned outside the subgraph)

Finally note that this variation:


digraph expression0 {
compound= true;
x; z;
subgraph cluster1 { a; b -> d; c; }
{ rank = same; c; a; x; d; }
}

does not crash, but the result is incorrect (it shows X Z C B A above and D below, it should be B above and A C X D below -- Z is free)

please, contact me as needed MH
Input:

digraph expression0 {
compound= true;
x; z;
subgraph cluster1 { a; b -> c; }
{ rank = same; c; a; }
}
Owner: *
Status: *