Results 1 to 4 of 4

Thread: help with the basic (collada dom)

  1. #1
    khilin
    Guest

    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 http://collada.org/owl, 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.

    khilin

    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.
    Code :
    	DAE kDae;
    	daeElement* kDaeRoot = kDae.open(pszFileName);
     
    	if (!kDaeRoot)
    		return false;
     
    	return true;

  2. #2
    Junior Member
    Join Date
    Jun 2006
    Location
    Morrison, CO
    Posts
    22
    Run the debug build under the debugger, and look at the call stack when it crashes to trace back to the problem.

  3. #3
    MeteC
    Guest
    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:

    Code :
    DAE dae;
    dae.open("c:\\COLLADA\\boxAutodesk.DAE");

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



    go figure?

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: help with the basic (collada dom)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •