On Sun, Dec 14, 2008 at 11:22 PM, Leonard Ritter <span dir="ltr">&lt;<a href="mailto:paniq@paniq.org">paniq@paniq.org</a>&gt;</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&#39;s hard to tell without more context: Who is doing the iteration, for example ?</blockquote>
</div></div></blockquote><div><br>I&#39;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>
&nbsp;</div></div>#0&nbsp; 0xb65593dc in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6<br>
#1&nbsp; 0xb6a85a9e in boost::python::throw_error_already_set ()<br>
&nbsp;&nbsp; from /usr/lib/libboost_python-gcc42-1_34_1-py25.so.1.34.1<br>
#2&nbsp; 0xb6a88ab1 in boost::python::objects::stop_iteration_error ()<br>
&nbsp;&nbsp; from /usr/lib/libboost_python-gcc42-1_34_1-py25.so.1.34.1<br>
#3&nbsp; 0xb6ca38c3 in
boost::python::objects::iterator_range&lt;boost::python::return_internal_reference&lt;1u,
boost::python::default_call_policies&gt;,
__gnu_cxx::__normal_iterator&lt;halebopp::wave_range*,
std::vector&lt;halebopp::wave_range,
std::allocator&lt;halebopp::wave_range&gt; &gt; &gt;
&gt;::next::operator() (this=0x9931cec, <br>
&nbsp;&nbsp;&nbsp; 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&#39;t say if it&#39;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>