« Return to Thread: [Graph] component_index crash on big graph

Re: [Graph] component_index crash on big graph

by Andrew Sutton-2 :: Rate this Message:

Reply to Author | View in Thread

>
>  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@...
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

 « Return to Thread: [Graph] component_index crash on big graph