Boost logo

Boost :

Subject: Re: [boost] [Graph] component_index crash on big graph
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-07-07 07:40:10


>
> I am using the incremental connected component + component_index to find
> connected components in an undirected graph. However the program works fine
> on small small dataset but segfaults on large input. I tried to do some
> debugging and the best I could come up was that it fails on
> array_push_front cal at the
> boost/graph/detail/incremental_component.hpp:78.
>

It doesn't appear as though you have allocated any vertices for the graph.
I'm pretty sure that add_edge does not allocate new vertices.

I would guess that every time you call add_vertex, you are referencing data
that doesn't actually exist. The successful run may be attributed to a) that
the default constructor for the graph (or vector) pre-allocates a small
number of elements, or b) pure luck.

Andrew Sutton
andrew.n.sutton_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk