I noticed crashes during NewtonTreeCollisionEndBuild() with large trees. This was in Newton 2.29; I just updated SVN, compiled the 2.34 DLL, copied the new .h/.dll/.lib files and it still crashes.
At the limit I an generate a tree file of around 159Mb. A stacktrace with the release DLL shows this:
0x0033667E d:\source\trunk\external\newton\corelibrary_200\source\core\dgstack.h (line 40): dgStackBase::dgStackBase()
0x003B7359 d:\source\trunk\external\newton\corelibrary_200\source\core\dgtypes.cpp (line 575): dgVertexListToIndexList()
0x003C0B3D d:\source\trunk\external\newton\corelibrary_200\source\core\dgaabbpolygonsoup.cpp (line 1655): dgAABBPolygonSoup::Create()
0x0036A2F0 d:\source\trunk\external\newton\corelibrary_200\source\physics\dgcollisionbvh.cpp (line 97): dgCollisionBVH::EndBuild()
0x0033339F d:\source\trunk\external\newton\corelibrary_200\source\newton\newton.cpp (line 3679): NewtonTreeCollisionEndBuild()
0x005DBE0F [tracked]: (filename not available): (function-name not available)
To debug this, should I:
- use the regular newton.h, link with newton_d.lib, and copy newton_d.dll? In other words, should I rename newton_d.dll to newton.dll in my app directory, or will it load newton_d.dll instead of newton.dll?
- will I probably get more information than the above?
I could generate a software zip that exhibits the problem (I use the newton.dll) but the mesh is around 240Mb unzipped, probably the software package would be around 150Mb zipped.
The problem is consistent; at some point, if I add too much, it starts crashing (I already tried NOT optimized the tree soup).
*EDIT* : I tried the newton_d.dll and it crashes after a failing m_malloc() in MallocLow(), trying to get 224Mb of memory. At that time my process is around 800Mb in memory size. It seems a simple out of memory failure, hm. Thought that didn't happen anymore in these virtual memory days.
Hm.