reactphysics3d icon indicating copy to clipboard operation
reactphysics3d copied to clipboard

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

Open robertocapuano opened this issue 1 year ago • 1 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

robertocapuano avatar Apr 12 '24 15:04 robertocapuano

I suppose the cause is the same of SphereVsSphereAlgorithm where a double check on penetrationDepth is perfromed. Added a pull request for this issue: https://github.com/DanielChappuis/reactphysics3d/pull/382

robertocapuano avatar Apr 12 '24 18:04 robertocapuano

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

DanielChappuis avatar Jun 27 '24 05:06 DanielChappuis