[v0.17] Dependency graph: Graphviz failed to create an image file

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

[v0.17] Dependency graph: Graphviz failed to create an image file

Post by industromatic »

I'm not a newbie, I have gotten a small amount of successful experience with freecad. I seem to aim for a top down parametric way to use freecad that is different than most. I have a doc with rather short chains of anything and yet it already is failing to make a dependency graph.

I get the error: Graphviz failed to create an image file.
cs-enc-spread-driven-9-dependency-graph-1.png
cs-enc-spread-driven-9-dependency-graph-1.png (30.34 KiB) Viewed 3336 times
My goal in creating this doc was to have independent modular reusable chunks of 3D parts to combine to make things, so it couldn't have been that deep a dependency graph.
cs-enc-spread-driven-9.fcstd
(280.84 KiB) Downloaded 61 times
A simpler file does create a dependency graph with same version of freecad.
  • OS: Debian GNU/Linux testing (buster)
    Word size of OS: 64-bit
    Word size of FreeCAD: 64-bit
    Version: 0.17.11967 (Git)
    Build type: Release
    Branch: master
    Hash: d0c5865f323aa9555662912f2ff96188f29096a6
    Python version: 2.7.13
    Qt version: 4.8.7
    Coin version: 4.0.0a
    OCC version: 7.1.0
    Locale: English/UnitedStates (en_US)
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by peterl94 »

Interesting, with the following version on macOS, I can create a graph of that file with no problem.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12058 (Git)
Build type: Release
Branch: master
Hash: 832e18689b1be199056f3fd150c0fa8a7d2f0b3d
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
[graphviz: 2.36]

However, I get the same error as you on Windows (same freecad version 0.17.12058, but using graphviz 2.38).
Attachments
cs-enc-spread-driven-9.png
cs-enc-spread-driven-9.png (585.62 KiB) Viewed 3320 times
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by wmayer »

On Windows I have graphviz 2.38 and when trying to create the picture I get a crash report that dot.exe stopped working. dot.exe is the utility of graphviz that creates the image file.

When exporting the graph to an external file with

Code: Select all

graph=App.ActiveDocument.exportGraphviz()
f=open("graph.viz","w")
f.write(graph)
f.close()
and then using dot.exe with:

Code: Select all

dot.exe graph.viz -ofile graph.png
it prints a couple of warnings
Warning: node '19', graph '' size too small for label
Warning: node '8', graph '' size too small for label
Warning: node '16', graph '' size too small for label
Warning: node '1', graph '' size too small for label
Warning: node '18', graph '' size too small for label
Warning: node '27', graph '' size too small for label
Warning: node '25', graph '' size too small for label
Warning: node '21', graph '' size too small for label
Warning: node '30', graph '' size too small for label
Warning: node '33', graph '' size too small for label
Warning: node '2', graph '' size too small for label
Warning: node '22', graph '' size too small for label
Warning: node '23', graph '' size too small for label
Warning: node '37', graph '' size too small for label
Warning: node '44', graph '' size too small for label
Warning: node '48', graph '' size too small for label
Warning: node '3', graph '' size too small for label
Warning: node '20', graph '' size too small for label
Warning: node '26', graph '' size too small for label
Warning: node '51', graph '' size too small for label
and then crashes.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by ickby »

I tried to disable the new depemndency-graph stuff like grouping, but it still fails:

BaseApp - Preferences - DependencyGraph: GeoFeatureSubgraphs = False
BaseApp - Preferences - DependencyGraph: Unflatten = False

So it seems there is something else going on.
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by industromatic »

I don't need this freecad doc for anything, but it could be a repeatable result debugging opportunity. Should I file it as a bug?
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by wmayer »

Looks more like a graphviz bug because the dot utility crashes, not FreeCAD.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by peterl94 »

It works with version 2.36 on both macOS and Windows....maybe it is a regression on their part. I wonder if there is a way to work around it.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by wmayer »

The file which makes dot to crash is:

Code: Select all

digraph "" {
graph [
compound=true];
subgraph clusterPart {
graph [
bgcolor="#a3609650", label="Part\n(cs-enc-master)", style="rounded,filled"];
subgraph clusterBody {
graph [
bgcolor="#efe53e50", label="Body\n(cs-enc-master-body)", style="rounded,filled"];
subgraph clusterOrigin001 {
graph [
bgcolor=none, label=Origin001];
19[fixedsize=true, height=0, style=invis, width=0];
55[label=XY_Plane001, shape=Mrecord, style=filled];
60[label=XZ_Plane001, shape=Mrecord, style=filled];
65[label=X_Axis001, shape=Mrecord, style=filled];
70[label=YZ_Plane001, shape=Mrecord, style=filled];
75[label=Y_Axis001, shape=Mrecord, style=filled];
80[label=Z_Axis001, shape=Mrecord, style=filled];
}
subgraph clusterDatumLine {
graph [
bgcolor="#e0e0e0", label=DatumLine, style="rounded,filled"];
8[fixedsize=true, height=0, style=invis, width=0];
9[fontsize="8pt", label="superPlacement.Base.y", shape=box, style=dashed];
10[fontsize="8pt", label="superPlacement.Base.x", shape=box, style=dashed];
}
subgraph clusterDatumPlane001 {
graph [
bgcolor="#e0e0e0", label="DatumPlane001\n(cs-enc-back-rear-plane)", style="rounded,filled"];
16[fixedsize=true, height=0, style=invis, width=0];
17[fontsize="8pt", label="Placement.Base.z", shape=box, style=dashed];
}
1[fixedsize=true, height=0, style=invis, width=0];
15[label="DatumPlane\n(cs-enc-back-mating-plane)", shape=Mrecord, style=filled];
8 -> 80[ltail=clusterDatumLine];
}
subgraph clusterOrigin {
graph [
bgcolor=none, label=Origin];
18[fixedsize=true, height=0, style=invis, width=0];
54[label=XY_Plane, shape=Mrecord, style=filled];
59[label=XZ_Plane, shape=Mrecord, style=filled];
64[label=X_Axis, shape=Mrecord, style=filled];
69[label=YZ_Plane, shape=Mrecord, style=filled];
74[label=Y_Axis, shape=Mrecord, style=filled];
79[label=Z_Axis, shape=Mrecord, style=filled];
}
subgraph clusterSketch {
graph [
bgcolor="#e0e0e0", label="Sketch\n(cs-enc-master-xy)", style="rounded,filled"];
27[fixedsize=true, height=0, style=invis, width=0];
28[fontsize="8pt", label="Constraints.EncHeight", shape=box, style=dashed];
29[fontsize="8pt", label="Constraints.EncWidth", shape=box, style=dashed];
}
25[fixedsize=true, height=0, style=invis, width=0];
15 -> 27[color=red, lhead=clusterSketch];
}
subgraph clusterPart001 {
graph [
bgcolor="#fa9ea250", label="Part001\n(cs-enc-back)", style="rounded,filled"];
subgraph clusterBody001 {
graph [
bgcolor="#98d70b50", label="Body001\n(cs-enc-back-sweep)", style="rounded,filled"];
subgraph clusterOrigin003 {
graph [
bgcolor=none, label=Origin003];
21[fixedsize=true, height=0, style=invis, width=0];
57[label=XY_Plane003, shape=Mrecord, style=filled];
62[label=XZ_Plane003, shape=Mrecord, style=filled];
67[label=X_Axis003, shape=Mrecord, style=filled];
72[label=YZ_Plane003, shape=Mrecord, style=filled];
77[label=Y_Axis003, shape=Mrecord, style=filled];
82[label=Z_Axis003, shape=Mrecord, style=filled];
}
subgraph clusterSketch001 {
graph [
bgcolor="#e0e0e0", label="Sketch001\n(cs-enc-master-sweep-profile)", style="rounded,filled"];
30[fixedsize=true, height=0, style=invis, width=0];
31[fontsize="8pt", label="Constraints.EncCornerRadiusMin.1", shape=box, style=dashed];
}
subgraph clusterSketch002 {
graph [
bgcolor="#e0e0e0", label="Sketch002\n(cs-enc-sweep-outline)", style="rounded,filled"];
33[fixedsize=true, height=0, style=invis, width=0];
34[fontsize="8pt", label="Constraints.EncCornerRadius", shape=box, style=dashed];
35[fontsize="8pt", label="Constraints.EncWidth", shape=box, style=dashed];
36[fontsize="8pt", label="Constraints.EncHeight", shape=box, style=dashed];
}
0[label=AdditivePipe, shape=Mrecord, style=filled];
2[fixedsize=true, height=0, style=invis, width=0];
0 -> 33[lhead=clusterSketch002];
0 -> 30[lhead=clusterSketch001];
}
subgraph clusterBody002 {
graph [
bgcolor="#d3066650", label="Body002\n(cs-enc-back-floor-n-bosses)", style="rounded,filled"];
subgraph clusterOrigin004 {
graph [
bgcolor=none, label=Origin004];
22[fixedsize=true, height=0, style=invis, width=0];
58[label=XY_Plane004, shape=Mrecord, style=filled];
63[label=XZ_Plane004, shape=Mrecord, style=filled];
68[label=X_Axis004, shape=Mrecord, style=filled];
73[label=YZ_Plane004, shape=Mrecord, style=filled];
78[label=Y_Axis004, shape=Mrecord, style=filled];
83[label=Z_Axis004, shape=Mrecord, style=filled];
}
subgraph clusterPad {
graph [
bgcolor="#e0e0e0", label=Pad, style="rounded,filled"];
23[fixedsize=true, height=0, style=invis, width=0];
24[fontsize="8pt", label=Length, shape=box, style=dashed];
}
subgraph clusterSketch003 {
graph [
bgcolor="#e0e0e0", label="Sketch003\n(cs-enc-floor-outline)", style="rounded,filled"];
37[fixedsize=true, height=0, style=invis, width=0];
38[fontsize="8pt", label="Constraints.EncCornerRadiusMin.5", shape=box, style=dashed];
39[fontsize="8pt", label="Constraints.EncWidth+1", shape=box, style=dashed];
40[fontsize="8pt", label="Constraints.EncCornerRadiusMin.5-", shape=box, style=dashed];
41[fontsize="8pt", label="Constraints.EncHeight+1", shape=box, style=dashed];
42[fontsize="8pt", label="Constraints.EncScrewHeadRad", shape=box, style=dashed];
}
subgraph clusterSketch004 {
graph [
bgcolor="#e0e0e0", label="Sketch004\n(cs-enc-subtract-sweep-outline)", style="rounded,filled"];
44[fixedsize=true, height=0, style=invis, width=0];
45[fontsize="8pt", label="Constraints.EncCornerRadius", shape=box, style=dashed];
46[fontsize="8pt", label="Constraints.EncWidth", shape=box, style=dashed];
47[fontsize="8pt", label="Constraints.EncHeight", shape=box, style=dashed];
}
subgraph clusterSketch005 {
graph [
bgcolor="#e0e0e0", label="Sketch005\n(cs-enc-back-subtract-sweep-profile)", style="rounded,filled"];
48[fixedsize=true, height=0, style=invis, width=0];
49[fontsize="8pt", label="Constraints.Constraint17", shape=box, style=dashed];
50[fontsize="8pt", label="Constraints[20]", shape=box, style=dashed];
}
3[fixedsize=true, height=0, style=invis, width=0];
4[fontsize="8pt", label="Placement.Base.z", shape=box, style=dashed];
6[label=Cone, shape=Mrecord, style=filled];
7[label=Cylinder, shape=Mrecord, style=filled];
52[label="SubtractivePipe\n(cs-enc-back-subtract-sweep-1)", shape=Mrecord, style=filled];
53[label="SubtractivePipe001\n(cs-enc-back-subtract-sweep-2)", shape=Mrecord, style=filled];
7 -> 23[lhead=clusterPad];
23 -> 37[lhead=clusterSketch003, ltail=clusterPad];
23 -> 6[ltail=clusterPad];
37 -> 58[ltail=clusterSketch003];
52 -> 44[lhead=clusterSketch004];
52 -> 48[lhead=clusterSketch005];
52 -> 7;
53 -> 44[lhead=clusterSketch004];
53 -> 48[lhead=clusterSketch005];
53 -> 52;
}
subgraph clusterOrigin002 {
graph [
bgcolor=none, label=Origin002];
20[fixedsize=true, height=0, style=invis, width=0];
56[label=XY_Plane002, shape=Mrecord, style=filled];
61[label=XZ_Plane002, shape=Mrecord, style=filled];
66[label=X_Axis002, shape=Mrecord, style=filled];
71[label=YZ_Plane002, shape=Mrecord, style=filled];
76[label=Y_Axis002, shape=Mrecord, style=filled];
81[label=Z_Axis002, shape=Mrecord, style=filled];
}
26[fixedsize=true, height=0, style=invis, width=0];
}
subgraph clusterSpreadsheet {
graph [
bgcolor="#e0e0e0", label="Spreadsheet\n(dimensions)", style="rounded,filled"];
5[fontsize="8pt", label=EncBackDepth, shape=box, style=dashed];
11[fontsize="8pt", label=EncBossSideDist, shape=box, style=dashed];
12[fontsize="8pt", label=EncHeight, shape=box, style=dashed];
13[fontsize="8pt", label=EncWallThick, shape=box, style=dashed];
14[fontsize="8pt", label=EncWidth, shape=box, style=dashed];
32[fontsize="8pt", label=EncCornerRadius, shape=box, style=dashed];
43[fontsize="8pt", label=EncScrewHeadRad, shape=box, style=dashed];
51[fixedsize=true, height=0, style=invis, width=0];
}
4 -> 5[arrowsize=0.5, style=dashed];
6 -> 15[color=red];
7 -> 8[color=red, lhead=clusterDatumLine];
9 -> 11[arrowsize=0.5, style=dashed];
9 -> 12[arrowsize=0.5, style=dashed];
9 -> 13[arrowsize=0.5, style=dashed];
10 -> 11[arrowsize=0.5, style=dashed];
10 -> 13[arrowsize=0.5, style=dashed];
10 -> 14[arrowsize=0.5, style=dashed];
17 -> 5[arrowsize=0.5, style=dashed];
24 -> 13[arrowsize=0.5, style=dashed];
28 -> 12[arrowsize=0.5, style=dashed];
29 -> 14[arrowsize=0.5, style=dashed];
31 -> 32[arrowsize=0.5, style=dashed];
33 -> 15[color=red, ltail=clusterSketch002];
34 -> 32[arrowsize=0.5, style=dashed];
35 -> 14[arrowsize=0.5, style=dashed];
36 -> 12[arrowsize=0.5, style=dashed];
38 -> 32[arrowsize=0.5, style=dashed];
39 -> 32[arrowsize=0.5, style=dashed];
39 -> 14[arrowsize=0.5, style=dashed];
40 -> 32[arrowsize=0.5, style=dashed];
41 -> 32[arrowsize=0.5, style=dashed];
41 -> 12[arrowsize=0.5, style=dashed];
42 -> 43[arrowsize=0.5, style=dashed];
44 -> 15[color=red, ltail=clusterSketch004];
45 -> 32[arrowsize=0.5, style=dashed];
46 -> 14[arrowsize=0.5, style=dashed];
47 -> 12[arrowsize=0.5, style=dashed];
49 -> 32[arrowsize=0.5, style=dashed];
50 -> 32[arrowsize=0.5, style=dashed];
}
When removing this block at the end

Code: Select all

39 -> 32[arrowsize=0.5, style=dashed];
39 -> 14[arrowsize=0.5, style=dashed];
40 -> 32[arrowsize=0.5, style=dashed];
41 -> 32[arrowsize=0.5, style=dashed];
41 -> 12[arrowsize=0.5, style=dashed];
42 -> 43[arrowsize=0.5, style=dashed];
44 -> 15[color=red, ltail=clusterSketch004];
45 -> 32[arrowsize=0.5, style=dashed];
46 -> 14[arrowsize=0.5, style=dashed];
47 -> 12[arrowsize=0.5, style=dashed];
49 -> 32[arrowsize=0.5, style=dashed];
50 -> 32[arrowsize=0.5, style=dashed];
then dot doesn't crash any more.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by wmayer »

Playing a bit further only these two lines are responsible to make dot fail:
39 -> 32[arrowsize=0.5, style=dashed];
39 -> 14[arrowsize=0.5, style=dashed];
But as there is nothing wrong in the syntax this must be clearly a graphviz.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: [v0.17] Dependency graph: Graphviz failed to create an image file

Post by GeneFC »

I had regular crashes of dot.exe for a long time. I reverted from version 2.38 back to 2.36, and the crashes stopped.

I just tried the supplied file from the OP. It crashed with 2.38 and worked fine with 2.36. Some sort of regression or a new "feature" in GraphViz.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11939 (Git)
Build type: Release
Branch: master
Hash: 6e7952ec672895900eec0c2a25807b25befba818
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

(Yes, a bit out of date, but probably not important for this purpose.)

Gene
Post Reply