shortest_distance segfaults for GraphView with weights
Please follow the general troubleshooting steps first:
Are you running the latest
Do you observe the problem with the current git version?
Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket
Did you compile
Do not forget to supply the following information:
A minimal and self-contained example that shows the problem.
Your operating system.
The Python version you are using.
If you compiled graph-tool manually: Your compiler version, as well as the version of Boost being used.
gt.__version__ == 2.43 (commit 5778eb10, )
- Python version: 3.9.7
Linux hostname 5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Installed / automatically compiled via conda-forge
import graph_tool.all as gt import random as rd G = gt.random_graph(1000, lambda: np.random.randint(1,10,2)) G_weight = G.new_edge_property('float') G_vp = G.new_vertex_property('bool') for v in G.vertices(): G_vp[v] = rd.randint(0,1) for e in G.edges(): G_weight[e] = rd.random() G.vertex_properties['trigger'] = G_vp G.edge_properties['weight'] = G_weight GV = gt.GraphView( G, vfilt=G.vertex_properties['trigger'] ) gt.shortest_distance( GV, weights=GV.edge_properties['weight'] ) Segmentation fault (core dumped)
Might be related to #722 (closed)