Boost logo

Boost :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2004-08-17 23:56:21


At Tuesday 2004-08-17 13:29, you wrote:
>Hi,
>
>
>
>On Tue, Aug 17, 2004 at 12:56:22PM -0700, Victor A. Wagner Jr. wrote:
> > I compiled replace_test with vs.net2005 and debugged it. It clearly
> throws
> > an exception, and re-throws it later from the test framework, which causes
> > the "ask to terminate abnormally" message.
> > BUT............
> > the output window has the following in it _before_ the exception is thrown:
> >
> > error: list iterators incompatible, at g:\program files\microsoft visual
> > studio 8\vc\include\list: 283
> >
> > I'm not sure why it thinks the iterators are incompatible, but.... it
> might
> > help the author(s) to have the above error mentioned in the failure log (I
> > don't know why it's not there)
> >
>
>I have seen this error, but because I don't have access to VC8.0 I couldn't
>fix it.
>
>Maybe you can try to step in the debuger up to the point of the exception,
>to pinpoint me where the problem occures.

Sure..... from the file <list> line 278 on my system

#if _HAS_ITERATOR_DEBUGGING
                 void _Compat(const const_iterator& _Right) const
                         { // test for compatible iterator pair
                         if (_Mycont == 0 || _Mycont != _Right._Mycont)
                                 {
                                 _DEBUG_ERROR("list iterators incompatible");
                                 _SCL_SECURE_INVALID_ARGUMENT;
                                 }
                         }

Looking at the variables _Mycont == 0 for both *this and _Right
I believe that means an empty list, though I didn't investigate further...
running UP the call stack we find:

_SCL_SECURE_VALIDATE(_Mycont != NULL && _Mycont == _Right._Mycont);
     g:\program files\microsoft visual studio 8\vc\include\list:262

if (_First == begin() && _Last == end())
     g:\program files\microsoft visual studio 8\vc\include\list:740

return Input.erase( From, To );
     c:\boost\include\boost-_32\boost\algorithm\string\detail\sequence.hpp:56

erase( Input, InsertIt, end(Input) );
     c:\boost\include\boost-1_32\boost\algorithm\string\detail\find_format_all.hpp:247

find_format_all_impl2(
     Input,
     Finder,
     Formatter,
     FindResult,
     Formatter(FindResult) );
     c:\boost\include\boost-1_32\boost\algorithm\string\detail\find_format_all.hpp:177-182

Finder(begin(Input), end(Input)));
     c:\boost\include\boost-1_32\boost\algorithm\string\find_format.hpp:248

const_formatter(Format) );
     c:\boost\include\boost-1_32\boost\algorithm\string\replace.hpp:647

TEST_ALGO( replace_all, "", string("") C_ string("XXXX"), string("") );
     c:\Projects\boost\libs\algorithm\string\test\replace_test.cpp:127

=================================================
hope that helps

>Anyway, what is the current state of VC8.0 platform. Is it already in
>reasonable enough state, to make special fixes for it, or is it still
>too volatile?
>
>
>Regards,
>
>Pavol.
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk