From: Ben W. <be...@sa...> - 2008-01-04 00:01:14
|
Ben Webb wrote: > To follow up on this (crash with "terminate called after throwing an > instance of 'swig::stop_iteration'") here is a simple example: ... This is also SWIG bug #1863647, so it doesn't get lost. At any rate, using the simplest example Python script: import module1 import module2 a = module1.vectori() for b in a: print b the gdb backtrace I get includes the following: #5 0x05e846c2 in std::terminate () from /usr/lib/libstdc++.so.6 #6 0x05e847fa in __cxa_throw () from /usr/lib/libstdc++.so.6 #7 0x0012e642 in swig::PySwigIteratorClosed_T<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, swig::from_oper<int> >::value () from /home/ben/tmp/swig/_module1.so #8 0x00152648 in swig::PySwigIterator::next () from /home/ben/swig/_module2.so #9 0x001507b2 in _wrap_PySwigIterator_next () from /home/ben/swig/_module2.so #10 0x0599d7cd in PyCFunction_Call () from /usr/lib/libpython2.5.so.1.0 The interesting thing here is that the iterator's next() method is pulled out of module2, but the exception is thrown from module1. Ben -- be...@sa... http://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle |