dot crashes on Windows - insufficient memory

the following gv file produced an insufficient memory message from dot, followed by an exit. is there a workaround? i have 8GB of RAM on my system. thanks kl123

What is the relationship between font-size and size measured in inches?

Thanks

kl123

AttachmentSize
example-crash.txt37.42 KB

Thanks for those inputs,

Thanks for those inputs, folks. (1) I'm attempting to produce a png file (-Tpng) for which it invoked Cairo when the crash appeared. (2) What makes dot produce such a large image (42 x 42 feet)? Is it the font size or rank separation I have specified? kl123

Just looking at the width,

Just looking at the width, the graph needs 52 ranks, plus you use edge labels, which effectively means the graph uses 104 ranks. Next, the graph is drawn with rankdir=LR, so the width of the ranks is determined by the text width of the labels. With fontsize=70, the narrowest node is 4.5 inches, the widest is 16 inches. Assuming each rank is 4.5 inches wide, 100 ranks yields 450 inches, or about 40 feet. Although the nodes are only about an inch high, there are effectively many rows.

In general, increasing the font size linearly increases the size of the layout. Unless you are displaying it on a large video screen or large paper, you'll need to scale down the drawing, effectively defeating the larger font size.

You might try removing fontsize=70 for edges and nodes, and change the edge labels to xlabels. This gives a drawing that is roughly 7 by 29 feet. You'll still probablly need to scale it down if you want bitmap output, but to my eye it is a much cleaner drawing. In all cases, the graph drawings show a great deal of structure.

What output format are you

What output format are you using? Bitmap? The actual layout doesn't use much memory, but the final drawing is very large (roughly 42 feet x 42 feet). Dot does catch this and attempts to scale the drawing down to an acceptable size, but apparently something still goes wrong. The simplest workarounds are to use a vector output format (svg, pdf, ps) or shrink the drawing yourself using the size attribute.

I copied your graph into

I copied your graph into GraphvizFiddle:
https://stamm-wilbrandt.de/GraphvizFiddle/

I do have 16GB of memory and below is Google Chrome Javascript console error message:

 Uncaught Assertion: Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ( 10485760), (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

Hermann.

out of memory?

TOTAL_MEMORY=10485760   is that in bytes?  That's just 10 megs.

If generating an image (like PNG, GIF or JPEG) you need to watch out for generating a huge image. In that case it may be that the underlying graphics library (such as gd, cairo or quartz on a Mac) just segfaults or generates some other runtime exception.  I think we check values returned from the graphics code generator but if they raise an exception what are we supposed to do anyway? 

 

Recent comments