On Sun, Dec 14, 2008 at 11:22 PM, Leonard Ritter <span dir="ltr"><<a href="mailto:paniq@paniq.org">paniq@paniq.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That's hard to tell without more context: Who is doing the iteration, for example ?</blockquote>
</div></div></blockquote><div><br>I'm sorry. I was a bit stressed out yesterday. I recognize that you only want to help, and I should be more patient.<br><br>Here is the top part of a stack trace, as it usually occurs:<br>
</div></div>#0 0xb65593dc in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6<br>
#1 0xb6a85a9e in boost::python::throw_error_already_set ()<br>
from /usr/lib/libboost_python-gcc42-1_34_1-py25.so.1.34.1<br>
#2 0xb6a88ab1 in boost::python::objects::stop_iteration_error ()<br>
from /usr/lib/libboost_python-gcc42-1_34_1-py25.so.1.34.1<br>
#3 0xb6ca38c3 in
boost::python::objects::iterator_range<boost::python::return_internal_reference<1u,
boost::python::default_call_policies>,
__gnu_cxx::__normal_iterator<halebopp::wave_range*,
std::vector<halebopp::wave_range,
std::allocator<halebopp::wave_range> > >
>::next::operator() (this=0x9931cec, <br>
self=@0x91fcfcc) at /usr/include/boost/python/object/iterator.hpp:64<br><br>This problem occurred first when iterating an array that was exported through the indexing suite. I do not have anything else that uses StopIteration, so I can't say if it's really a problem of the indexing suite. My guess is: no. When I rewrote the offending code to be a simple get-by-index operation, the next (above) part where an iteration would be caused inside C++ code created a problem. So somehow I end up with an unhandled python exception in boost that does not get forwarded - my guess.<br>
<br>Could this in some way relate to assertions (put by assert()) put in the C++ code? Something like: boost catches these assertions, converts them into exceptions, then iterates a bit, hits a StopIteration and has the previously unhandled exception still active? I am just wildly guessing here.<br>
<br>Please help!<br>