Boost logo

Boost Users :

From: David Ohlemacher (ohlemacher_at_[hidden])
Date: 2003-10-17 15:37:40


Hi again Thomas,

I am also getting cores with subgraphs.

    // Test subgraphs.
    typedef adjacency_list_traits<vecS, vecS, directedS> Traits;
    typedef subgraph< adjacency_list<vecS, vecS, directedS,
        property<vertex_color_t, int>,
            property<edge_index_t, int> > > Graph2;

    const char* name0 = "abcdef";
    enum {a, b, c, d, e, f, n}; // for conveniently refering to
vertices in G0
    Graph2 g0(n);
    add_vertex(a, g0);
    add_vertex(b, g0);
    add_vertex(c, g0);
    add_vertex(d, g0);
    add_vertex(e, g0);
    add_vertex(f, g0);

    print_graph(g0, name0);

    Graph2& g1 = g0.create_subgraph();

testfilgr: /usr/lib/boost/boost/graph/subgraph.hpp:265:
boost::subgraph<Graph>::vertex_descriptor
boost::add_vertex(boost::subgraph<Graph>::vertex_descriptor,
boost::subgraph<G>&) [with G = boost::adjacency_list<boost::vecS,
boost::vecS, boost::directedS, boost::property<boost::vertex_color_t,
int, boost::no_property>, boost::property<boost::edge_index_t, int,
boost::no_property>, boost::no_property, boost::listS>]: Assertion
`!g.is_root()' failed.
Abort (core dumped)

Another assert. the program runs with debugging turned off.

-d

Thomas F. O'Connell wrote:

>In trying to compile and run the Kevin Bacon example for graph in the
>1.30.2 distribution of Boost, I was able to compile, but when I ran the
>executable, I got:
>
>kevin-bacon: /usr/local/boost-1.30.2/boost/token_iterator.hpp:75: void
>boost::detail::tokenizer_policy<Type,
>TokenizerFunc>::increment(Iterator&) [with Iterator =
>boost::iterator_adaptor<boost::detail::token_iterator_base<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::detail::tokenizer_policy<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::char_delimiters_separator<char, std::char_traits<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::forward_iterator_tag, ptrdiff_t>, Type = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, TokenizerFunc = boost::char_delimiters_separator<char, std::char_traits<char> >]: Assertion `b.base().valid_' failed.
>Aborted
>
>Investigating led me to comment out the asserts on lines 69 and 75 of
>boost/token_iterator.hpp just to test. When I rebuilt without the
>asserts, I was able to run my executable with no problem with seemingly
>correct output.
>
>What purpose do the asserts serve, and why would they be failing?
>
>-tfo
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>

-- 
David Ohlemacher
BBN Technologies
127 John Clarke Rd.
Middletown, RI 02878
Phone: (401)848-3542, Fax:(401)849-8611
ohlemacher at bbn dot com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net