help with the basic (collada dom)

Hi, I’m writing an aplication in c++ and i’m trying to implement collada dom on it. I’ve never used it before, so I’m using the tutorial in this site to learn how to do it.
I did everything on the first part of the tutorial (“DOM guide: Setting up”) and it went OK, I include it in my aplication and it compiles OK.
Now I’m trying to load up some info from a dae file I download from, just a box, I copy exactly the code on the first example in the tutorial and I get and error:
“Unhandled exception at 0x7c81eb33 in TestGame.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012ea70…”
in the open method. I checked but I didn’t find the error.
Does anybody has any sugestion???
Thank you very much.


PS: This is my code, I just changed the name of the variables to match the rest of my code. The pszFileName is correct, I checked it.

	DAE kDae;
	daeElement* kDaeRoot =;
	if (!kDaeRoot)
		return false;

	return true;

Run the debug build under the debugger, and look at the call stack when it crashes to trace back to the problem.

For anyone with the same problem, I had 'bad_alloc’s all over the place while using debug build (using VC++ 2008 Express) for the following very simple 2 lines of code:

DAE dae;"c:\\COLLADA\\boxAutodesk.DAE");

However, in release build the same code compiles and runs fine…

go figure? :?

Under Windows, there are many differences between debug and release builds regarding memory heaps. For example, in debug builds the heaps are separate and attempts to [de]allocate memory across heap boundaries is flagged as an error. The debug heaps are much stricter in their operations in support of debugging memory usage problems in software prior to release.