Skip to content

segmentation fault for LayeredBlockstate

Hello, I have a fresh installation (via conda-forge) of graph-tool, I've noticed I cannot replicate a simple example on the documentation page about LayeredBlockState:

import graph_tool.all as gt
g = gt.collection.ns["new_guinea_tribes"]

state = gt.minimize_nested_blockmodel_dl(g,
                                         state_args=dict(base_type=gt.LayeredBlockState,
                                                         state_args=dict(ec=g.ep.weight, layers=True)))

as it crashes with

python(96682,0x1ec578c00) malloc: Double free of object 0x1533dfd00
python(96682,0x1ec578c00) malloc: *** set a breakpoint in malloc_error_break to debug

I have tested old version of graph-tool and the last version not crashing is 2.59. Unfortunately I can only test this on osx-arm64 binary version, currently I don't have access to a other systems:

python --version
Python 3.12.4

uname -a
Darwin C0010295.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64
Edited by Davide Cittaro