Memory leak in 2.08 for 3dsmax

I’ve been trying to integrate these collada importers/exporters into our pipeline and I’ve been having a whole lot of trouble.

  1. trying to import many DAE files eventually crashes max because it apparently never releases memory allocated during importing. All I’m doing is looping through a bunch (200) of files through maxscript, and trying to import them all using the importFile() method. Watching the page file usage shows a nice uphill slope all the way to a crash.

  2. I’ve had some problems with importing objects which had a multi sub object material on export (i’ve made a fix locally…where should i send this too?)

  3. With moving the product over to feelingsoft have we now lost access to the source?

Any help on any of these items would be very helpful!


Upon investigating some more, it seems that the bulk of the memory overhead is from textures being loaded. Problem is that if i have two objects (one per DAE file), it doesn’t seem to matter that they each share the same material/texture, the importer will create a duplicate.

If i save the file and reopen max, the memory consumption is far less (loading in 50 objects i get memory usage of 2.06gb, after saving and reopening it goes down to 830mb). Seems to me that it would be a reasonable goal to not have to restart max to recover wasted memory.

I’d love to hear any feedback on ways to improve this situation, as this is currently blocking my progress.


Hi RobK,

If you import two documents separately, it makes sense that they create different instances of the same material. We cannot safely assume that name-matching will give the right material and actually verifying that two materials with the same name have the exact same parameters would be a pain.

If you import two meshes within the same document, then ColladaMax will follow whatever the COLLADA document tells it to do: if the two meshes instantiate the same material, 3dsMax should re-use the material on import. If that does not work for your test case, please send me a detailed email with a test scene.

ColladaMax does check for memory leaks, using the CRT memory debugger, when built in debug mode. I’ll admit that I haven’t looked at the results in the past few weeks… so I’ll add this to my todo list, before the next release of ColladaMax.