DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D

Home Page:http://www.reactphysics3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.10.0: Assertion Failed in NarrowPhaseInfoBatch::addContactPoint()

robertocapuano opened this issue · comments

I'm using a series of CapsuleShapes joined together and after some time the anomaly is raised.
This happens also in last version 0.10.0.

Assertion failed: (penDepth > decimal(0.0)), function addContactPoint, file NarrowPhaseInfoBatch.h, line 167.

#4 0x00000001003ceac3 in reactphysics3d::NarrowPhaseInfoBatch::addContactPoint(unsigned int, reactphysics3d::Vector3 const&, float, reactphysics3d::Vector3 const&, reactphysics3d::Vector3 const&) [inlined] at /modules/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInfoBatch.h:167
#5 0x00000001003ceaa4 in reactphysics3d::CapsuleVsCapsuleAlgorithm::testCollision(reactphysics3d::NarrowPhaseInfoBatch&, unsigned int, unsigned int, reactphysics3d::MemoryAllocator&) (.cold.3) at /modules/reactphysics3d/src/collision/narrowphase/CapsuleVsCapsuleAlgorithm.cpp:195
#6 0x00000001003ce972 in reactphysics3d::NarrowPhaseInfoBatch::addContactPoint(unsigned int, reactphysics3d::Vector3 const&, float, reactphysics3d::Vector3 const&, reactphysics3d::Vector3 const&) [inlined] at /modules/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInfoBatch.h:167
#7 0x00000001003ce96d in reactphysics3d::CapsuleVsCapsuleAlgorithm::testCollision(reactphysics3d::NarrowPhaseInfoBatch&, unsigned int, unsigned int, reactphysics3d::MemoryAllocator&) at modules/reactphysics3d/src/collision/narrowphase/CapsuleVsCapsuleAlgorithm.cpp:195
#8 0x0000000100430505 in reactphysics3d::CollisionDetectionSystem::testNarrowPhaseCollision(reactphysics3d::NarrowPhaseInput&, bool, reactphysics3d::MemoryAllocator&) at /modules/reactphysics3d/src/systems/CollisionDetectionSystem.cpp:647
#9 0x000000010042c71d in reactphysics3d::CollisionDetectionSystem::computeNarrowPhase() at /modules/reactphysics3d/src/systems/CollisionDetectionSystem.cpp:704
#10 0x0000000100468fcb in reactphysics3d::PhysicsWorld::update(float) at /modules/reactphysics3d/src/engine/PhysicsWorld.cpp:255

I suppose the cause is the same of SphereVsSphereAlgorithm where a double check on penetrationDepth is perfromed.
Added a pull request for this issue:
#382

This issue should now be fixed in release of version v0.10.1. Thanks again for reporting this issue.