Boost C++ Libraries: Ticket #272: undirected adjacency_matrix example segfaults at print_graph https://svn.boost.org/trac10/ticket/272 <pre class="wiki">Example 2 from http://www.boost.org/libs/graph/doc/adjacency_matrix.html creates a segfault in the second to last line boost::print_graph(ug, name); Details follow: Program received signal SIGSEGV, Segmentation fault. 0x0804a276 in bool boost::detail::get_edge_exists&lt;char&gt;(char const&amp;, ...) (edge_proxy=@0xc804bbe9) at adjacency_matrix.hpp:84 /usr/include/boost/graph/adjacency_matrix.hpp:84:2923:beg:0x804a276 (gdb) up #1 0x0804ab6b in boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned&gt; &gt;::dereference() const (this=0xbfffead0) at adjacency_matrix.hpp:228 (gdb) up #2 0x0804ab0c in dereference&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;size_t, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, size_t, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, size_t&gt; &gt; &gt; (f=@0xbfffead0) at iterator_facade.hpp:341 (gdb) up #3 0x0804aae2 in boost::iterator_facade&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned&gt; &gt;, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned&gt;, boost::random_access_traversal_tag, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned&gt;, int&gt;::operator*() const (this=0xbfffead0) at iterator_facade.hpp:442 (gdb) up #4 0x0804aa7b in boost::filter_iterator&lt;boost::detail::does_edge_exist, boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned&gt; &gt; &gt;::satisfy_predicate() (this=0xbfffead0) at filter_iterator.hpp:102 /usr/include/boost/iterator/filter_iterator.hpp:102:2993:beg:0x804aa7b (gdb) up #5 0x0804a9fd in filter_iterator (this=0xbfffead0, f={&lt;No data fields&gt;}, x={&lt;iterator_adaptor&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned int, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned int, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt; &gt;,__gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,boost::use_default,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,int&gt;&gt; = {&lt;iterator_facade&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned int, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned int, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt; &gt;,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,boost::random_access_traversal_tag,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,int&gt;&gt; = {&lt;No data fields&gt;}, m_iterator = {&lt;iterator&lt;std::random_access_iterator_tag,char,int,char*,char&amp;&gt;&gt; = {&lt;No data fields&gt;}, _M_current = 0x804d050 ""}}, m_src = 0, m_inc = 3221220248, m_targ = 0, m_n = 6}, end={&lt;iterator_adaptor&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned int, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned int, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt; &gt;,__gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,boost::use_default,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,int&gt;&gt; = {&lt;iterator_facade&lt;boost::detail::undir_adj_matrix_out_edge_iter&lt;unsigned int, __gnu_cxx::__normal_iterator&lt;char*, std::vector&lt;char, std::allocator&lt;char&gt; &gt; &gt;, unsigned int, boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt; &gt;,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,boost::random_access_traversal_tag,boost::detail::matrix_edge_desc_impl&lt;boost::undirected_tag, unsigned int&gt;,int&gt;&gt; = {&lt;No data fields&gt;}, m_iterator = {&lt;iterator&lt;std::random_access_iterator_tag,char,int,char*,char&amp;&gt;&gt; = {&lt;No data fields&gt;}, _M_current = 0x804d065 ""}}, m_src = 0, m_inc = 3221220260, m_targ = 0, m_n = 6}) at filter_iterator.hpp:61 (gdb) up #6 0x08049f60 in std::pair&lt;boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;::out_edge_iterator, boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;::out_edge_iterator&gt; boost::out_edges&lt;boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;(boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;::vertex_descriptor, boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt; const&amp;) (u=0, g_=@0xbfffed70) at adjacency_matrix.hpp:529 (gdb) up #7 0x08049cc7 in void boost::print_graph_dispatch&lt;boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;, char const*&gt;(boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt; const&amp;, char const*, boost::undirected_tag) (G=@0xbfffed70, name=0x804b0fc "ABCDEF") at graph_utility.hpp:201 (gdb) up #8 0x08048e28 in void boost::print_graph&lt;boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt;, char const*&gt;(boost::adjacency_matrix&lt;boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, std::allocator&lt;bool&gt; &gt; const&amp;, char const*) (G=@0xbfffed70, name=0x804b0fc "ABCDEF") at graph_utility.hpp:211 (gdb) up #9 0x08048a9a in main () at undirected_adj_matrix.cc:25 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/272 Trac 1.4.3 burnce Tue, 24 Aug 2004 12:15:53 GMT <link>https://svn.boost.org/trac10/ticket/272#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/272#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=1044311 Using the "acency_matrix.cpp" example file in the documentation I get this error on various linux versions and various architectures. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Douglas Gregor</dc:creator> <pubDate>Sun, 31 Oct 2004 19:42:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/272#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/272#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=249098 I can no longer duplicate this bug. Can anyone else? If not, I'll close it. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Douglas Gregor</dc:creator> <pubDate>Thu, 25 Nov 2004 07:27:04 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/272#comment:3 https://svn.boost.org/trac10/ticket/272#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket