Rob Smyth - 2005-03-09

Hi,

I've compiline CppUnit in VS7 to work with a unicode project.  The example project works fine but when i add a test case in my code i get an exception in the test case constructor.  It looks like std::basic_string thinks it has a huge string (see stack below)

     ntdll.dll!77f75a58()    
     ntdll.dll!77f9cb5e()    
     ntdll.dll!77f9cfc4()    
     ntdll.dll!77f9e139()    
     ntdll.dll!77f58a3a()    
>    msvcr71d.dll!_heap_alloc_base(unsigned int size=3997696)  Line 212    C
     ntdll.dll!77f85010()    
     msvcr71d.dll!_unlock(int locknum=4)  Line 347    C
     msvcr71d.dll!_nh_malloc_dbg(unsigned int nSize=32, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0)  Line 267 + 0x7    C
     msvcr71d.dll!_nh_malloc_dbg(unsigned int nSize=32, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0)  Line 260 + 0x27    C
     msvcr71d.dll!malloc(unsigned int nSize=11150940)  Line 139 + 0x15    C
     msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Eos(unsigned int _Newsize=3291224)  Line 1475 + 0x22    C++
     msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Eos(unsigned int _Newsize=0)  Line 1475 + 0x22    C++
     msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned int _Newsize=2147348480, unsigned int _Oldlen=3291249)  Line 1471    C++
     003238b8()   
     msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right={...}, unsigned int _Roff=0, unsigned int _Count=4294967295)  Line 604    C++
     msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right={...})  Line 326    C++
     cppunitd_dll.dll!CppUnit::TestCase::TestCase(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name={...})  Line 47 + 0x7b    C++
     00000001()   
     mgsdisco.exe!TestFixture01::suite()  Line 35 + 0xf0    C++
     mgsdisco.exe!CppUnit::TestSuiteFactory<TestFixture01>::makeTest()  Line 21    C++
     cppunitd_dll.dll!CppUnit::TestFactoryRegistry::addTestToSuite(CppUnit::TestSuite * suite=0x00323710)  Line 148 + 0xd    C++
     cppunitd_dll.dll!CppUnit::TestFactoryRegistry::makeTest()  Line 136    C++

Anybody else had this problem?

Thx

Robert Smyth