C++/CLI winfomrs app and Collada DOM problem

Hello everybody,

A few days ago I started to work on a collada project using Collada DOM and VS2008. I decided that my proyect should be a CLR win forms application because its easy to build GUIs (I need a rich gui and I dont like MFC) so I started testing some components, seting up opengl, etc…yesterday I begin setting up Collada DOM and then started my problems. First I had a lot of problems while linking my project with both the static and the dynamic version of DOM due to the /clr:pure or /clr:safe parameter (CLR support) in the project properties (clr:pure is the default value) so I changed it to /clr and the project finally linked well, but when i tried to run my application the following message appears:

Debug Assertion Failed!

Program: …\projectDirectory\project.exe
File: X:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c
Line: 1511

Expression: _CrtIsValidHeapPointer(pUserData)

if I click any of the buttons the program breakes and then ends or breaks depending on the option. Inside my code there is only 1 line of the collada dom and is the include one:

#include <dae.h>

so i think there is a kind of incompatibility with clr and the dom…any ideas about how to solve this awful problem?

thanks in advance.

PD: im not an english speaker, i hope you understand what im trying to explain :wink:

I think you are experiencing a release vs debug build problem.

With /CLR you need to use the right type of build for what you are doing at the moment. You’ll need as many as four libraries built depending on your project settings:

[li]DOM multithreaded release[/:m:cwpc2v7r][/li][li]DOM multithreaded debug[/:m:cwpc2v7r][/li][li]DOM multithreaded DLL release[/:m:cwpc2v7r][/li][li]DOM multithreaded DLL debug[/:m:cwpc2v7r][/ol][/li]
For static linking, you also have to make sure that you give the linker the libraries in the correct dependency order.

Im doing a dynamic link and I think libraries are OK, if I create a MFC application I can work without problem with the same settings (of course no /CLR) and even more, if I change my clr winform to console application and then add a form etc., i dont get those errors, but a console application isnt what I need :? (the console application is the same only changing the entry point, leaving it blank and changing SubSystem inside linker options form windows to console)