gak / pycallgraph

pycallgraph is a Python module that creates call graphs for Python programs.
GNU General Public License v2.0
1.82k stars 336 forks source link

Graphviz fails to build output #150

Open Dreen opened 8 years ago

Dreen commented 8 years ago

When generating output for my profiled code I get the following error:

libpath/shortest.c:324: triangulation failed
libpath/shortest.c:192: source point not in any triangle
Error: in routesplines, Pshortestpath failed
Segmentation fault (core dumped)
Traceback (most recent call last):
  File "/usr/local/bin/pycallgraph", line 26, in <module>
    exec(__file_content)
  File "/usr/local/lib/python3.4/dist-packages/pycallgraph/pycallgraph.py", line 38, in __exit__
    self.done()
  File "/usr/local/lib/python3.4/dist-packages/pycallgraph/pycallgraph.py", line 81, in done
    self.stop()
  File "/usr/local/lib/python3.4/dist-packages/pycallgraph/pycallgraph.py", line 90, in generate
    output.done()
  File "/usr/local/lib/python3.4/dist-packages/pycallgraph/output/graphviz.py", line 112, in done
    'code %(ret)i.' % locals())
pycallgraph.exceptions.PyCallGraphException: The command "dot -Tpng -opycallgraph.png /tmp/tmpjxrt96s0" failed with error code 35584.
gak commented 8 years ago

Segmentation fault (core dumped)

This might be a graphviz error. I can see a few bug report on theirs issue tracker: http://www.graphviz.org/mantisbt/view.php?id=2382 http://www.graphviz.org/mantisbt/view.php?id=2246

The latter might have a solution about changing the splines setting.

Can you show a reproducible example, and give me the environment specs?

evgeniikozhanov commented 7 years ago

I decrease max_depth, and it's work for me.

ghost commented 6 years ago

Hello, i found a workaround and what you can do is when you call dot pass as an argument: -Gnewrank=true without specifying max_depth and it will work!

yuvalneteera commented 5 years ago

I decrease max_depth, and it's work for me.

worked for me too thanks!