Page 1 of 1

Possible bug in btBvhTriangleMeshShape

Posted: Sun Aug 10, 2008 5:23 am
by reltham
When you construct a btBvhTriangleMeshShape and set the flag for it to not build it's bvh at construction time and then set the scale on it, it will crash on accessing a null m_bvh pointer down inside processAllTriangles().

The desire is to avoid building the bvh twice when something is scaled. Once at construction and once when you scale it.

I'm not sure how to go about fixing this, or if there is some other approach that works?

Re: Possible bug in btBvhTriangleMeshShape

Posted: Wed Aug 13, 2008 6:41 am
by Erwin Coumans
Haven't checked the implementation (at SIGGRAPH at the moment), but it seems that checking for NULL for m_bvh should solve the problem.

Have you tried that?
Thanks,
Erwin

Re: Possible bug in btBvhTriangleMeshShape

Posted: Wed Aug 13, 2008 6:48 am
by reltham
Well the issue is that is should be able to calculate an aabb without the bvh, so it can't just check for null and fail, I think it needs to check for null and use another method.