I haven't been able to render these files since graphviz 2.26

I get segmentation faults in windows and ubuntu.

Here is my latest errors (in windows, v2.38)

Faulting application dot.exe, version, faulting module gvc.dll, version, fault address 0x00050d3c.

Faulting application dot.exe, version, faulting module gvc.dll, version, fault address 0x00050d47.

In Ubuntu, v2.36:

[55891.247706] traps: dot[29209] general protection ip:7f3637ce47a2 sp:7fff35f57cc0 error:0 in libgvc.so.6.0.0[7f3637c8e000+89000]


In both Windows and Linux, the issue is in the GVC library.


These files rendered just fine with 2.26 and 2.28.  i've tried 2.30, 2.36 and 2.38.

Link to dot files:


Note:  the heartfelt academy file does work.

Edit1:  I was able to find a 2.26 windows installer in the archive, so this gets me off high-center.  I really do need to work on these on my linux machine though.  And the underlying bug in new versions is still there.

Edit2: I also tried 2.28.  it works fine.  I have issues at 2.30 and newer.

Edit3: added linux info above.

If you look closely, you'll

If you look closely, you'll see that the output of 2.26 has some problems. In particular, some of the flat edges are not clipped properly to the boundary of the node. (For example, Kotomi_4:a1 -> Tomoyo_3:a1). This problem was fixed in 2.28, except that the solution does not work with record nodes. Although these have a convenient syntax, they have been derogated for a long time, being replaced by HTML-like labels. So the solution is to replace record nodes with table elements. For example, instead of

  Tomoyo_20 [shape = Mrecord, label = "<a1>Help him out|<a2>Refuse"];

one would use

  Tomoyo_20 [shape = none, label = <<TABLE cellborder="0" style="rounded"><TR><TD port="a1">Help him out</TD><VR/><TD port="a2">Refuse</TD></TR></TABLE>>];


Thats fine and all, and I've

Thats fine and all, and I've painstakenly made that change to heartfelt academy and the main flowchart.

It does not fix my segmentation fault.  graphviz 2.38 still crashes with this:

Faulting application dot.exe, version, faulting module gvc.dll, version, fault address 0x00050d47.

FYI, i'm using this at the command line:  (With the image files located in a folder called "dot_files")

.\dot.exe -Tpng Clannad_VN_Flowchart.dot -O

If there is anything i need to add, let me know.


Heartfelt academy actually looks worse using HTML tables though.


Heartfelt Academy V2 - http://pastebin.com/1LUQ4ym9

Clannad VN V2 - http://pastebin.com/qRGJdJdu


Also, note that the HTML versions dont work on graphviz 2.26, so if i cant get 2.38 to work, i'll continue using 2.26.

You are correct. I forgot to

You are correct. I forgot to mention that there was one additional bug that was only recently fixed. You need to use 2.39. With that, I have no problem running your graphs on Windows.

Please be more specific as to why you feel HTML-labels look worse than records in Heartfelt Academy. One should be able to make the tables look identical to records. Thanks.

Thank you! I

Thank you!

I used graphviz-2.39.20140905 and everything renders.


The issue with the HTML labels is that they are smaller and the edges dont go to the edge of the table.

In heartfelt academy, I have edges going from a port to the node itself.  "HFA_q1:a2 -> HFA_q2;" when rendered, there is a blank area at the arrow.  if it goes port to port, then the arrow is inside the node (which isnt as bad.)


I will continue using the HTML style though, as edges are being lost in Clannad_VN_Flowchart.dot:

Warning: flat edge between adjacent nodes one of which has a record shape - replace records with HTML-like labels
  Edge Tomoyo_3 -> Kotomi_4
Error: lost Kotomi_4 Tomoyo_3 edge
Error: lost Kotomi_4 Tomoyo_3 edge
Error: lost Tomoyo_19 Tomoyo_20 edge


thank you very much for your help. the minor details dont matter much and i can continue to make this look better.

i had even started looking at the source code between 2.28 and 2.30 in the GVC section to see if something stood out at me.  I'm not too fluent in C though however, and i didnt see anything.

oh, and if anyone has a script to parse out Mrecords to convert them to HTML style, I'd be grateful.  I did it by hand before which was tedious.  I might just make my own.

Both the problems you mention

Both the problems you mention are easily fixed. The TABLE and TD elements allow you to specify padding and spacing. By default, these are small to keep the node size down, but if you want bigger nodes, you can play with these. As for the arrow not reaching the node, the node is actually bigger than the HTML-like label (set shape=box), and without a port specification, the edge is clipped to the node boundary, though no perimeter is drawn with shape=none. The fix this, set the node margin and height=0. Putting this all together, you would have, for example,

        HFA_q1 [height=0 margin="0" shape = none label = <<TABLE cellpadding="7" cellborder="0" style="rounded"><TR><TD port="a1">Confess</TD><VR/><TD port="a2">See her off</TD></TR></TABLE>>];

Not that I think about it, it would be useful to have a shape that can be used as shorthand for

  width=0 height=0 margin="0" shape = none

in the typical case when one uses an HTML-like label as the whole node.


Yes, that looks better.

Yes, that looks better.  thank you.


You could take that idea a step further.  You could make custom nodes with user-defined settings.

for example:

template [name=Custom1 height=0 margin="0" shape = none label=<<TABLE cellpadding="7" cellborder="0" style="rounded"><TR><TD port="a1">this text will be replaced,</TD><VR/><TD port="a2">unless its not defined later.</TD></TR></TABLE>>];

HFA_q1 [template=Custom1, port:a1="Confess", port:a2="See her off"];

HFA_q2 [template=Custom1, port:a1="Confess", port:a2="Watch her"];

test1 [template=Custom1, port:a2="this is a test"]

so our HFA_q1 and HFA_q2 will look like normal, but test1 will say "this text will be replaced, | this is a test."  (in most cases the TD would remain blank when defining a custom node)

This way i could define a couple styles at the beginning of my file, and reuse those as many times as i wanted, without the massive clutter of the HTML labels everywhere, making it easier to read.

you could have templates be generic, and be able to use them on nodes, edges, subgraphs, etc.

We've actually considered

We've actually considered adding something like this every so often but other features seemed more pressing, especially as many users generate their graphs automatically, so the dot language plays something of the role of an assembly language. Also note that you can use subgraphs to get some attribute sharing. For example, all nodes declared in the subgraph


  node[shape=none width=0 height=0 margin=0]


will have the attribute values specified in the node statement. Of course, this doesn't work for HTML-like labels or allow parameterization and substitution.

Recent comments