I am using a vector<wxString> in my program and it causes a debug assertion in Windows2000. My application name is pacektanalyzer.exe
The error message is as follows...
Windows has triggered a breakpoint in Packetanalyzer.exe
This may due to corruption in the heap, and includes a bug in PacketAnalyzer.exe or any of the DLLs it has loaded.
The call stack is given below
Code: Select all
msvcr80d.dll!_free_dbg_nolock(void * pUserData=0x02552c60, int nBlockUse=1) Line 1252 + 0x30 bytes C++
msvcr80d.dll!_free_dbg(void * pUserData=0x02552c60, int nBlockUse=1) Line 1194 + 0xd bytes C++
msvcr80d.dll!free(void * pUserData=0x02552c60) Line 1152 + 0xb bytes C++
wxbase28ud_vc_custom.dll!wxStringData::Unlock() Line 243 + 0x3f bytes C++
wxbase28ud_vc_custom.dll!wxStringBase::~wxStringBase() Line 397 C++
wxbase28ud_vc_custom.dll!wxString::~wxString() + 0x16 bytes C++
PacketAnalyzer.exe!wxString::`scalar deleting destructor'() + 0x2e bytes C++
PacketAnalyzer.exe!std::_Destroy<wxString>(wxString * _Ptr=0x0275a238) Line 61 C++
PacketAnalyzer.exe!std::allocator<wxString>::destroy(wxString * _Ptr=0x0275a238) Line 161 + 0x9 bytes C++
PacketAnalyzer.exe!std::_Destroy_range<wxString,std::allocator<wxString> >(wxString * _First=0x0275a238, wxString * _Last=0x0275a23c, std::allocator<wxString> & _Al={...}, std::_Nonscalar_ptr_iterator_tag __formal={...}) Line 235 + 0xc bytes C++
PacketAnalyzer.exe!std::_Destroy_range<wxString,std::allocator<wxString> >(wxString * _First=0x0275a238, wxString * _Last=0x0275a23c, std::allocator<wxString> & _Al={...}) Line 226 + 0x2e bytes C++
PacketAnalyzer.exe!std::vector<wxString,std::allocator<wxString> >::_Destroy(wxString * _First=0x0275a238, wxString * _Last=0x0275a23c) Line 1083 + 0x14 bytes C++
PacketAnalyzer.exe!std::vector<wxString,std::allocator<wxString> >::_Tidy() Line 1096 C++
PacketAnalyzer.exe!std::vector<wxString,std::allocator<wxString> >::~vector<wxString,std::allocator<wxString> >() Line 547 C++
PacketAnalyzer.exe!ProcessFilter::ExecuteUserFilter(wxString FilterExp={...}) Line 597 + 0x59 bytes C++
Code: Select all
wxString Filter::ExecuteUserFilter(wxString FilterExp)
{
......
....
vector<wxString> FilesNames;
wxStructStat FileStatus;
wxFileOffset TotalFileLength=0,OverAllBytesRead=0;
wxString fn;
while(QueryResult.NextRow()) //This a sqlite3 database select result set access fn.
{
fn=QueryResult.GetString(0);
FilesNames.push_back(fn);
...
}
.....
......
}
Can you give me some hints?