Jump to content
  • Advertisement
Sign in to follow this  
Nairou

Weird problem: TinyXML and _STLP_DEBUG (stlport)

This topic is 5467 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[An updated question on the recent troubles I've been having. I hope this is the right place for this.] Are there any known problems with TinyXML and STLPort's debug mode (defining _STLP_DEBUG)? I've been using TinyXML in my project, and recently added _STLP_DEBUG to the debug version to allow Boost::filesystem to compile, but the program now freezes. Compiles fine, but doesn't run. However the Release (non-debug) version works as it should. I finally narrowed it down to a conflict between TinyXML and the _STLP_DEBUG define. Even the following code on its own, with _STLP_DEBUG defined, will freeze on execution:
#define TIXML_USE_STL
#include <tinyxml.h>

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
TiXmlDocument doc;
doc.LoadFile( "test.xml" );
}
Nothing to it, and yet it freezes every time. If I run the program under the debugger and pause it while its frozen, it always turns up in the following STLPort function (within _threads.c):
template <int __inst>
void _STLP_CALL
_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock)
Any possible ideas what could be causing the conflict? Given the simplicity of the test code causing the freeze, I don't know what else to try. Any ideas? [Edited by - Nairou on September 25, 2004 10:09:50 PM]

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the suggestion, I didn't consider the multithreading issue. I am using the following libraries:

Boost 1.31
STLPort 4.6.2
TinyXML 2.3.2

I just tried recompiling TinyXML with the multi-threaded runtime libraries (the library project was setup for single-threaded runtimes), but that made no difference on the freezing debug problem. Whether TinyXML is truly thread-safe or not, I'm not sure, I've posted that question to the TinyXML forum but have yet to receive a reply. My project only ever accesses TinyXML from a single thread, so I would think it would be fine there.

The other two I can only assume are thread safe (I'd be surprised if they weren't). I know STLPort was compiled with the multi-threaded runtimes, I saw it in the makefile. I can't find it in Boost, I can only assume.

Share this post


Link to post
Share on other sites
*bump*

Surely I'm not the only person using both TinyXML and STLPort? Has no one come across this before? Is my computer just playing games with me or what?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!