I have code like this that blows up when destroying TiXmlDocument:
TiXmlDocument pDoc = new TiXmlDocument;
pDoc->Parse((char*)data);
if (pDoc->Error())
{
//Shows no error and in debugger
//it looks like valid xml
}
delete pDoc; //Blows up
Call stack looks like this:
> msvcr71d.dll!_free_dbg_lk(void * pUserData=0x01115a58, int nBlockUse=0x00000001) Line 1175 + 0x2b C
msvcr71d.dll!_free_dbg(void * pUserData=0x01115a58, int nBlockUse=0x00000001) Line 1070 + 0xd C
mfc71d.dll!operator delete(void * p=0x01115a58) Line 369 + 0xc C++
TTM_MonitorD.exe!TiXmlDeclaration::`scalar deleting destructor'() + 0x27 C++
TTM_MonitorD.exe!TiXmlNode::~TiXmlNode() Line 157 + 0x20 C++
TTM_MonitorD.exe!TiXmlDocument::~TiXmlDocument() Line 1106 + 0x58 C++
TTM_MonitorD.exe!TiXmlDocument::`scalar deleting destructor'() + 0x16 C++
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have code like this that blows up when destroying TiXmlDocument:
TiXmlDocument pDoc = new TiXmlDocument;
pDoc->Parse((char*)data);
if (pDoc->Error())
{
//Shows no error and in debugger
//it looks like valid xml
}
delete pDoc; //Blows up
Call stack looks like this:
> msvcr71d.dll!_free_dbg_lk(void * pUserData=0x01115a58, int nBlockUse=0x00000001) Line 1175 + 0x2b C
msvcr71d.dll!_free_dbg(void * pUserData=0x01115a58, int nBlockUse=0x00000001) Line 1070 + 0xd C
mfc71d.dll!operator delete(void * p=0x01115a58) Line 369 + 0xc C++
TTM_MonitorD.exe!TiXmlDeclaration::`scalar deleting destructor'() + 0x27 C++
TTM_MonitorD.exe!TiXmlNode::~TiXmlNode() Line 157 + 0x20 C++
TTM_MonitorD.exe!TiXmlDocument::~TiXmlDocument() Line 1106 + 0x58 C++
TTM_MonitorD.exe!TiXmlDocument::`scalar deleting destructor'() + 0x16 C++
Sounds interesting.
Can you get it into a small but complete, reproducable program, including XML in the code?
Or in the meantime, post the XML.