Segfault when drawing a graph
I get a segfault when I try to use draw_graphviz. Here is a minimal example, following the example in the documentation:
import graph_tool.generation
import graph_tool.centrality
import graph_tool.draw
import numpy as np
g = graph_tool.generation.price_network(1500)
deg = g.degree_property_map("in")
deg.a = 2 * (np.sqrt(deg.a) * 0.5 + 0.4)
ebet = graph_tool.centrality.betweenness(g)[1]
print("Start drawing")
graph_tool.draw.graphviz_draw(g, vcolor=deg, vorder=deg, elen=10,
ecolor=ebet, eorder=ebet, output="graphviz-draw.pdf")
And here is the output of the GNU debugger with both Python 2 and Python 3:
[muellner@desktop ~]$ gdb python2
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python2.7...(no debugging symbols found)...done.
(gdb) run gttest.py
Starting program: /usr/bin/python2 gttest.py
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffd1c13700 (LWP 1691)]
[New Thread 0x7fffcbfff700 (LWP 1696)]
[New Thread 0x7fffcb7fe700 (LWP 1697)]
[New Thread 0x7fffcaffd700 (LWP 1698)]
[New Thread 0x7fffca7fc700 (LWP 1699)]
[New Thread 0x7fffc9ffb700 (LWP 1700)]
[New Thread 0x7fffc97fa700 (LWP 1701)]
[New Thread 0x7fffc8ff9700 (LWP 1702)]
Start drawing
Program received signal SIGSEGV, Segmentation fault.
0x00007fffd0d6689f in agmapnametoid () from /usr/lib/libcgraph.so.6
(gdb) quit
A debugging session is active.
Inferior 1 [process 1685] will be killed.
Quit anyway? (y or n) y
[muellner@desktop ~]$ gdb python3
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python3.3...(no debugging symbols found)...done.
(gdb) run gttest.py
Starting program: /usr/bin/python3 gttest.py
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffd1dea700 (LWP 1725)]
[New Thread 0x7fffd0899700 (LWP 1728)]
[New Thread 0x7fffcbfff700 (LWP 1729)]
[New Thread 0x7fffcb7fe700 (LWP 1730)]
[New Thread 0x7fffcaffd700 (LWP 1731)]
[New Thread 0x7fffca7fc700 (LWP 1732)]
[New Thread 0x7fffc9ffb700 (LWP 1733)]
[New Thread 0x7fffc97fa700 (LWP 1734)]
Start drawing
Program received signal SIGSEGV, Segmentation fault.
0x00007fffd0ebc0f0 in agopen () from /usr/lib/libcgraph.so.6
(gdb) quit
A debugging session is active.
Inferior 1 [process 1719] will be killed.
Quit anyway? (y or n) y
[muellner@desktop ~]$
OS: Arch Linux, all packages up-to-date as of Nov 30, 2012. Graph_tool version: 2.2.27