VC8.0 and algorithm/string/replace failure

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) Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"

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. 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.

Pavol Droba wrote:
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?
I wouldn't recommend making special fixes for VC8 at least until beta 2 is released sometime later this year. That said, the iterator compatibility issue mentioned in this thread should probably be looked into. The VC8 iterator debugging is based on the Dinkumware 4.0x library that's been available for some time, so it's likely that there's a real problem with the code and not a compiler/library bug. -cd

At Tuesday 2004-08-17 13:29, you wrote:
Hi,
I compiled replace_test with vs.net2005 and debugged it. It clearly
On Tue, Aug 17, 2004 at 12:56:22PM -0700, Victor A. Wagner Jr. wrote: 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"

Victor A. Wagner Jr. wrote:
At Tuesday 2004-08-17 13:29, you wrote:
Hi,
I compiled replace_test with vs.net2005 and debugged it. It clearly
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
On Tue, Aug 17, 2004 at 12:56:22PM -0700, Victor A. Wagner Jr. wrote: throws 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...
No, it means that both *this and _Right are singular iterators. You're not allowed to compare two singular iterators ... std::list<int>::iterator i1, i2; if( i1 == i2 ) // oops! Someone who is familiar with the test can verify whether this is, in fact, what is happening. -- Eric Niebler Boost Consulting www.boost-consulting.com

Hi On Tue, Aug 17, 2004 at 09:56:21PM -0700, Victor A. Wagner Jr. wrote:
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:
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
It seems, that I have fixed this error, but there is another one. Regression tests fails with similar reason, but on a different place. Could you try it out and give me the stack. It would help a lot. Thanks, Pavol.

Sorry for the delay in replying.... if you _need_ the variables at each point let me know, it's a fair amount of busy work to get them. At Friday 2004-08-27 02:47, you wrote: >It seems, that I have fixed this error, but there is another one. >Regression tests fails with >similar reason, but on a different place. > >Could you try it out and give me the stack. It would help a lot. kernel32.dll!77e73887() kernel32.dll!77e73887() replace.exe!_CxxThrowException(void * pExceptionObject=0x00123580, const _s__ThrowInfo * pThrowInfo=0x006998a8) Line 145 C++ > replace.exe!boost::detail::report_error(boost::execution_exception::error_code ec=system_error, boost::unit_test::basic_cstring<char const > msg1={...}, boost::unit_test::basic_cstring<char const > msg2={...}) Line 582 C++ replace.exe!boost::detail::assert_reporting_function(int reportType=1, char * userMessage=0x001257d8, int * retVal=0x001237b8) Line 171 + 0x27 bytes C++ replace.exe!_VCrtDbgReportA(int nRptType=1, const char * szFile=0x00000000, int nLine=0, const char * szModule=0x00000000, const char * szFormat=0x0068ed38, char * arglist=0x00128864) Line 396 + 0x18 bytes C replace.exe!_CrtDbgReportV(int nRptType=1, const char * szFile=0x00000000, int nLine=0, const char * szModule=0x00000000, const char * szFormat=0x0068ed38, char * arglist=0x00128864) Line 306 + 0x1d bytes C replace.exe!_CrtDbgReport(int nRptType=1, const char * szFile=0x00000000, int nLine=0, const char * szModule=0x00000000, const char * szFormat=0x0068ed38, ...) Line 323 + 0x1d bytes C replace.exe!_NMSG_WRITE(int rterrnum=10) Line 200 + 0x18 bytes C replace.exe!abort() Line 61 + 0x7 bytes C replace.exe!std::_Debug_message(const char * s1=0x00681ffc, const char * s2=0x00682038) Line 14 C++ replace.exe!std::list<char,std::allocator<char> >::_Insert(std::lis replace.exe!std::list<char,std::allocator<char> >::_Insert(std::list<char,st d::allocator<char> >::iterator _Where=-51 'Í', const char & _Val='Z') Line 641 + 0xf bytes C++ replace.exe!std::list<char,std::allocator<char> >::_Insert<std::_St replace.exe!std::list<char,std::allocator<char> >::_Insert<std::_String_cons t_iterator<char,std::char_traits<char>,std::allocator<char> > >() Line 703 + 0x37 bytes C++ replace.exe!std::list<char,std::allocator<char> >::insert<std::_Str replace.exe!std::list<char,std::allocator<char> >::insert<std::_String_const _iterator<char,std::char_traits<char>,std::allocator<char> > >() Line 660 C++ replace.exe!boost::algorithm::detail::replace_const_time_helper<1>::operator()<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::replace_const_time_helper<1>::operator()<std::list<char,std::allocator<char> >,std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > >() Line 115 C++ replace.exe!boost::algorithm::detail::replace_native_helper<0>::operator()<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::replace_native_helper<0>::operator()<std::list<char,std::allocator<char> >,std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > >() Line 135 C++ replace.exe!boost::algorithm::detail::replace<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::replace<std::list<char,std::allocator<char> >,std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > >(std::list<char,std::allocator<char> > & Input=[0](), std::list<char,std::allocator<char> >::iterator From=-18 'î', std::list<char,std::allocator<char> >::iterator To=-51 'Í', std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > Begin={...}, std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > End={...}) Line 166 C++ replace.exe!boost::algorithm::detail::replace<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::replace<std::list<char,std::allocator<char> >,boost::algorithm::iterator_range<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > >(std::list<char,std::allocator<char> > & Input=[0](), std::list<char,std::allocator<char> >::iterator From=-18 'î', std::list<char,std::allocator<char> >::iterator To=-51 'Í', const boost::algorithm::iterator_range<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > & Insert={...}) Line 177 + 0xb9 bytes C++ replace.exe!boost::algorithm::detail::find_format_impl2<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::find_format_impl2<std::list<char,std::allocator<char> >,boost::algorithm::detail::head_finderF,boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,boost::algorithm::iterator_range<std::list<char,std::allocator<char> >: :iterator>,boost::algorithm::iterator_range<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > >(std::list<char,std::allocator<char> > & Input=[0](), boost::algorithm::detail::head_finderF Finder={...}, boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > Formatter={...}, const boost::algorithm::iterator_range<std::list<char,std::allocator<char> >::iter ator> & FindResult={...}, const boost::algorithm::iterator_range<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > & FormatResult={...}) Line 198 + 0x60 bytes C++ replace.exe!boost::algorithm::detail::find_format_impl<std::list<char,std::allocator<char> replace.exe!boost::algorithm::detail::find_format_impl<std::list<char,std::allocator<char> >,boost::algorithm::detail::head_finderF,boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,boost::algorithm::iterator_range<std::list<char,std::allocator<char> >: :iterator> >(std::list<char,std::allocator<char> > & Input=[0](), boost::algorithm::detail::head_finderF Finder={...}, boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > Formatter={...}, const boost::algorithm::iterator_range<std::list<char,std::allocator<char> >::iter ator> & FindResult={...}) Line 166 + 0x38 bytes C++ replace.exe!boost::algorithm::find_format<std::list<char,std::allocator<char> replace.exe!boost::algorithm::find_format<std::list<char,std::allocator<char> >,boost::algorithm::detail::head_finderF,boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >(std::list<char,std::allocator<char> > & Input=[0](), boost::algorithm::detail::head_finderF Finder={...}, boost::algorithm::detail::const_formatF<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > Formatter={...}) Line 136 + 0xac bytes C++ replace.exe!boost::algorithm::replace_head<std::list<char,std::allocator<char> replace.exe!boost::algorithm::replace_head<std::list<char,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >(st d::list<char,std::allocator<char> > & Input=[0](), unsigned int N=3, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & Format="Z") Line 803 + 0x57 bytes C++ replace.exe!replace_head_test() Line 159 + 0x898 bytes C++ replace.exe!test_main(int __formal=1, int __formal=1) Line 277 C++ replace.exe!`anonymous namespace'::call_test_main() Line 37 + 0x12 bytes C++ replace.exe!boost::unit_test::function_test_case::do_run() Line 138 + 0x2d bytes C++ replace.exe!boost::unit_test::ut_detail::unit_test_monitor::function() Line 77 + 0x16 bytes C++ replace.exe!boost::execution_monitor::run_function() Line 190 + 0x58 bytes C++ replace.exe!boost::detail::catch_signals(boost::execution_monitor & exmon={...}, bool __formal=true, bool __formal=true) Line 474 C++ replace.exe!boost::execution_monitor::execute(bool catch_system_errors=true, int timeout=0) Line 213 + 0x11 bytes C++ replace.exe!boost::unit_test::ut_detail::unit_test_monitor::execute_and_translate(boost::unit_test::test_case * target_test_case=0x003331b0, void (void)* f=0x004d5604, int timeout=0) Line 43 + 0x13 bytes C++ replace.exe!boost::unit_test::test_case::run() Line 145 + 0x6c bytes C++ replace.exe!main(int argc=1, char * * argv=0x00334148) Line 83 C++ replace.exe!mainCRTStartup() Line 283 + 0x19 bytes C kernel32.dll!77e814c7() >Thanks, > >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"

On Mon, Aug 30, 2004 at 08:06:26AM -0700, Victor A. Wagner Jr. wrote:
Sorry for the delay in replying.... if you _need_ the variables at each point let me know, it's a fair amount of busy work to get them.
No problem, I will try to decrypt the stack, it should be sufficient. Thanks. Pavol
participants (4)
-
Carl Daniel
-
Eric Niebler
-
Pavol Droba
-
Victor A. Wagner Jr.