Hi Andrew,

2010/2/8 Andrew Sutton <andrew.n.sutton@gmail.com>

The code below crashes (segfault) in the max_flow() function. Could you tell me what am I doing wrong ?
It seems to work when I set a capacity capacity[p2.first] with a value smaller than 10 (capacity[p.first]). Am I missing something? Do I correctly use the reverse property_map?
 
Where precisely does it crash?

Here is the backtrace from gdb (sorry ...). Eric, no I did not forget to add vertices in my graph. It is build in another function that I removed for clarity. I have 333 vertices in my graph, and 4 edges. Do I correctly use the edge_reverse property_map?

Regards,

Olivier

Program received signal SIGSEGV, Segmentation fault.
#0  0x08075839 in boost::detail::kolmogorov<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>, boost::adj_list_edge_property_map<boost::directed_tag, long, long const&, unsigned int, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > const, boost::edge_capacity_t>, boost::adj_list_edge_property_map<boost::directed_tag, long, long&, unsigned int, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::edge_residual_capacity_t>, boost::adj_list_edge_property_map<boost::directed_tag, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int> const&, unsigned int, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > const, boost::edge_reverse_t>, boost::vec_adj_list_vertex_property_map<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>*, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>&, boost::vertex_predecessor_t>, boost::vec_adj_list_vertex_property_map<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::---Type <return> to continue, or q <return> to quit---
edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>*, boost::default_color_type, boost::default_color_type&, boost::vertex_color_t>, boost::vec_adj_list_vertex_property_map<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > >, boost::no_property, boost::listS>*, long, long&, boost::vertex_distance_t>, boost::vec_adj_list_vertex_id_map<boost::property<boost::vertex_index_t, long, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_distance_t, long, boost::property<boost::vertex_potential_t, long, boost::property<boost::vertex_predecessor_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, boost::no_property> > > > >, unsigned int> >::max_flow() ()
#1  0x08063fab in main ()
 

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users