My guess would be that you have an inconsistency in your build. Try to rebuild everything.
If that doesn't help, you may try to use a third-party STL library.
You may also use the non-STL version by undefining TIXML_USE_STL.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
This simple declaration makes my debbugger hang:
TiXmlDocument doc;
When tracing the calls, I get to this:
// tinyxml.cpp
TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::DOCUMENT )
{
tabsize = 4;
ClearError(); // HERE
}
then ClearError() is called :
// tinyxml.h
void ClearError() { error = false;
errorId = 0;
errorDesc = ""; // HERE
errorLocation.row = errorLocation.col = 0;
//errorLocation.last = 0;
}
then errorDesc is assigned "", but the strange thing is that the STL is called.
Why is that ?
// _string.h
_Self& operator=(const _CharT* __s) { // hang on this very first line
_STLP_FIX_LITERAL_BUG(__s)
return assign(__s, __s + traits_type::length(__s));
}
I am using Borland C++ Builder.
Mickael.
My guess would be that you have an inconsistency in your build. Try to rebuild everything.
If that doesn't help, you may try to use a third-party STL library.
You may also use the non-STL version by undefining TIXML_USE_STL.
Hi, I found the bug.
It was not related to TinyXML so I have to reassure you guys. Sorry.
I don't know why but WIN32 was not defined and when including winsock2.h the packing size was changed.
// winsock2.h
#if !defined(WIN32) && !defined(_WIN64)
#include <pshpack4.h>
// This was included but shouldn't have been
#endif
[...]
#if !defined(WIN32) && !defined(_WIN64)
#include <poppack.h>
// But this wasn't !!! Really strange
#endif
I have defined WIN32 in the project options, and no bug anymore.... Still don't know why WIN32 is not defined.... But __WIN32__ is....
Anyway, the packing size was changed and this fucked up the STL.