vertex.in_edges() on undirected graphs throws a segmentation fault
This is python 2.7 and graph-tool 2.2.38_0 Code:
import graph_tool as gt
g = gt.Graph() g.set_directed(False) v0 = g.add_vertex() v1 = g.add_vertex() e01 = g.add_edge(v0,v1) v = g.vertex(0) [e for e in v.out_edges()] [<Edge object with source '0' and target '1' at 0x104d110e8>] [e for e in v.in_edges()] Segmentation fault: 11
On 29.05.2015 17:28, Smith, Steven - 1004 - MITLL wrote:
This is python 2.7 and graph-tool 2.2.38_0
This has already been fixed. Please update to the latest version. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
This has already been fixed. Please update to the latest version.
Sorry, Tiago. I’m also getting a segmentation fault with the latest 2.2.42_0:
$ port -qv installed | grep graph-tool py-graph-tool @2.2.42_0 (active) platform='darwin 14' archs='noarch' py27-graph-tool @2.2.42_0 (active) platform='darwin 14' archs='x86_64’
$ ipython Python 2.7.10 (default, May 29 2015, 16:43:17) Type "copyright", "credits" or "license" for more information.
IPython 3.1.0 -- An enhanced Interactive Python.
On 30.05.2015 03:31, Smith, Steven - 1004 - MITLL wrote:
This has already been fixed. Please update to the latest version.
Sorry, Tiago. I’m also getting a segmentation fault with the latest 2.2.42_0:
Well, I cannot reproduce this here. Do you have a backtrace of the segfault? Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Well, I cannot reproduce this here.
Do you have a backtrace of the segfault?
Thanks again Tiago. Here’s what I see via gdb: $ ulimit -c unlimited $ ./gt_out_edges.py Segmentation fault: 11 $ gdb /opt/local/bin/python /cores/core.99439 (gdb) bt … . warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10/build/temp.macosx-10.10-intel-2.7/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10/Modules/zlibmodule.o" - no debug information available for "zlibmodule.c". . done #0 0x000000011008ee1f in graph_tool::PythonIterator<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > >, boost::joined_edge_iterator<boost::adj_list<unsigned long>, mpl_::bool_<false> > >::Next () (gdb) bt #0 0x000000011008ee1f in graph_tool::PythonIterator<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > >, boost::joined_edge_iterator<boost::adj_list<unsigned long>, mpl_::bool_<false> > >::Next () #1 0x000000011008f219 in boost::python::detail::caller_arity<1u>::impl<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > > (graph_tool::PythonIterator<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > >, boost::joined_edge_iterator<boost::adj_list<unsigned long>, mpl_::bool_<false> > >::*)(), boost::python::default_call_policies, boost::mpl::vector2<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > >, graph_tool::PythonIterator<graph_tool::PythonEdge<boost::UndirectedAdaptor<boost::adj_list<unsigned long> > >, boost::joined_edge_iterator<boost::adj_list<unsigned long>, mpl_::bool_<false> > >&> >::operator() () #2 0x000000011252f9ce in boost::python::objects::function::call () #3 0x0000000112531b6a in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke () #4 0x0000000112538213 in boost::python::detail::exception_handler::operator() () #5 0x000000010f03ccc6 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<graph_tool::ValueException, void (*)(graph_tool::ValueException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(graph_tool::ValueException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke () #6 0x00000001125381fb in boost::python::detail::exception_handler::operator() () #7 0x000000010f03cd96 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<graph_tool::IOException, void (*)(graph_tool::IOException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(graph_tool::IOException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke () #8 0x00000001125381fb in boost::python::detail::exception_handler::operator() () #9 0x000000010f03ce66 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<graph_tool::GraphException, void (*)(graph_tool::GraphException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(graph_tool::GraphException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke () #10 0x0000000112537fb3 in boost::python::handle_exception_impl () #11 0x00000001125315c3 in boost::python::objects::function_call () #12 0x000000010c7a6a73 in PyObject_Call () #13 0x000000010c7b3d17 in instancemethod_call () #14 0x000000010c7a6a73 in PyObject_Call () #15 0x000000010c807e71 in call_method () #16 0x000000010c843aef in PyEval_EvalFrameEx () #17 0x000000010c843102 in PyEval_EvalCodeEx () #18 0x000000010c842a76 in PyEval_EvalCode () #19 0x000000010c86c654 in PyRun_FileExFlags () #20 0x000000010c86c177 in PyRun_SimpleFileExFlags () #21 0x000000010c88215c in Py_Main () #22 0x00007fff886215c9 in start ()
participants (2)
-
Smith, Steven - 1004 - MITLL -
Tiago de Paula Peixoto