Number: 1189
Title: Nested clusters also crash dot
Submitter: Jens
Date: Wed Sep 5 08:18:09 2007
Subsys: Dot
Version: 2.14.1
System: x86-Windows-2000
Severity: minor
Problem:
Call dot crash1.dti with the file supplied. dot.exe crashs with the following box:


---------------------------
dot.exe - Fehler in Anwendung
---------------------------
Die Anweisung in "0x00471fae" verweist auf Speicher in "0x000000e0". Der Vorgang

"read" konnte nicht auf dem Speicher durchgeführt werden.

Klicken Sie auf "OK", um das Programm zu beenden. Klicken Sie auf "Abbrechen", um das Programm zu debuggen. --------------------------- OK Abbrechen ---------------------------


Input file: b1189.dot
Comments:
[erg] As with bug 1187, the syntax is incorrect. If the correct syntax is used, there is no problem. Of course, dot still shouldn't crash.

[erg] Looking more closely at DOT's grammar, I realize I was mistaken: your input graph should be legal. I'm guessing it has something to do with cluster_X and cluster_Y being first created as subgraphs of M, and then later being put into cluster_XY. In any case, another workaround is to move the definitions of the subclusters after cluster_XY.


digraph M {
   A -> B
   C -> D
   subgraph cluster_XY { label="XY"; subgraph cluster_X;subgraph cluster_Y; }
   subgraph cluster_X  { label="X"; A;B; }
   subgraph cluster_Y  { label="Y"; C;D; }
}

[erg] Allowing a subgraph with no body currently causes cycles in the subgraph graph, which can cause serious problems, as here. Allowing this in the language is not worth the trouble of implementing all the subtleties correctly. Therefore, the "fix" for this bug is to deprecate and, eventually, disallow non-defining subgraph references. Thus, the appropriate graph is


digraph M {
   A -> B
   C -> D
   subgraph cluster_XY {
     label="XY";
     subgraph cluster_X  { label="X"; A;B; }
     subgraph cluster_Y  { label="Y"; C;D; }
  }
}

Owner: erg
Status: Fixed (6 Sep 2007)