ConvexDecomposition Assert/Memory Leak

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

ConvexDecomposition Assert/Memory Leak

Postby MeltingPlastic » Sun Aug 12, 2018 8:43 pm

Hi Julio, I am trying to maintain that I can run my program in full debug mode without asserts being thrown.

I recently added convex decomposition as a CollisionShape type in the Urho3D engine.

The following asserts get thrown for me related to introducing this:

dgMeshEffect3.cpp (line 753):
Code: Select all
dgAssert (0);

dgIntersections.cpp (lines 164-167)
Code: Select all
 
dgAssert (p0.m_w == dgFloat32(0.0f));
dgAssert (p1.m_w == dgFloat32(0.0f));
dgAssert (boxP0.m_w == dgFloat32(0.0f));
dgAssert (boxP1.m_w == dgFloat32(0.0f));


So as an experiment I commented out the asserts to allow the program to run.

After this I get a final assert at the exit of my program indicating memory leaks:
dgMemory.cpp (line 170):
Code: Select all
dgAssert (m_memoryUsed == 0);


I made a further experiment and commented out that line as well. As expected a third party memory leak detector also detected the memory leak at the exit of my program.

Is there a way the asserts can be turned into traces or something for enabling runtime support for debug mode? Also do you think there a good fix for the memory leaks?

The asserts in dgIntersections.cpp looks like its a check for small boxes? I am not sure what the first assert is about.

Thanks again for your time!
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: ConvexDecomposition Assert/Memory Leak

Postby Julio Jerez » Sun Aug 12, 2018 9:41 pm

the convex decomposition is commented out, and will provably be removed from the engine.
That was a tool that was ther for a long time, because it was better than most tool available,
but now there are very good third party tools than can do a much better job than Newton.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: ConvexDecomposition Assert/Memory Leak

Postby MeltingPlastic » Mon Aug 13, 2018 11:33 am

sounds good. Is there a library that you recommend? V-HACD is the only one I've found
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: ConvexDecomposition Assert/Memory Leak

Postby Julio Jerez » Mon Aug 13, 2018 11:59 am

MeltingPlastic wrote:sounds good. Is there a library that you recommend? V-HACD is the only one I've found

V-HACD is very good yes, at one point newton was better and faster, but that was about 6 or 7 years ago, since them Kale the author has made great improvement in quality, performance and versatility.
Therefore when I get to the point of revisiting the convex decomposition I will probably use his library as a third party add-on. But I will not spend time re writing my on version again.
One reason for this is that Newton is primarrilly a real time libray and things like convex decomposition are better done by offline tool because they require lot of user iteration by tweaking parameters.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 7 guests