I am having trouble finding an access violation in my program. This happens when the destructor is called a third time, exactly when the destructor seems to end.
I spent hours trying to track this, so I am looking for further advice on what I can do. I create an instance of the class with the new
and delete
operators. The Visual Studio output window shows:
First-chance exception at 0x60e3ad84 (msvcp100d.dll) in WebCollationAgent.exe: 0xC0000005: Access violation writing location 0xabababab. Unhandled exception at 0x60e3ad84 (msvcp100d.dll) in WebCollationAgent.exe: 0xC0000005: Access violation writing location 0xabababab.
Is there anything I can do to try to figure out what was in these places of memory?
The call stack window shows the following (in reverse order, when I inserted it in chronological order, from earliest to last):
Program.exe!Network::`scalar deleting destructor'() + 0x2b bytes C++ Program.exe!std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >() Line 754 + 0xf bytes C++ Program.exe!std::_String_val<wchar_t,std::allocator<wchar_t> >::~_String_val<wchar_t,std::allocator<wchar_t> >() Line 478 + 0xb bytes C++
msvcp100d.dll! std :: _ Container_base12 :: _ Orphan_all () String 214 + 0x5 bytes C ++
My best guess in this information is that there is some kind of string variable causing the problem? Does anyone have any tips on interpreting this information?
Any other tips would also be helpful, thanks in advance.
I am coding for Windows 7 and using Visual Studio 2010 Professional.