reactphysics3d icon indicating copy to clipboard operation
reactphysics3d copied to clipboard

Destroying an empty physics world leads to assertion failure (after upgrading to 0.10.0)

Open superlcr opened this issue 11 months ago • 0 comments

After upgrading to 0.10.0, destroying a newly created empty world causes an assertion failure:

rp3d::PhysicsCommon common;
auto* world = common.createPhysicsWorld();
common.destroyPhysicsWorld(world);

Assertion failed: (size > 0), function release, file HeapAllocator.cpp, line 220.

#1	0x0000000105429ba4 in reactphysics3d::HeapAllocator::release(void*, unsigned long) at ./reactphysics3d/src/memory/HeapAllocator.cpp:220
#2	0x00000001054236dc in reactphysics3d::Deque<unsigned int>::~Deque() at ./reactphysics3d/include/reactphysics3d/containers/Deque.h:300
#3	0x0000000105423688 in reactphysics3d::Deque<unsigned int>::~Deque() at ./reactphysics3d/include/reactphysics3d/containers/Deque.h:295
#4	0x0000000105423654 in reactphysics3d::EntityManager::~EntityManager() at ./reactphysics3d/include/reactphysics3d/engine/EntityManager.h:42
#5	0x0000000105419fac in reactphysics3d::EntityManager::~EntityManager() at ./reactphysics3d/include/reactphysics3d/engine/EntityManager.h:42
#6	0x000000010541a58c in reactphysics3d::PhysicsWorld::~PhysicsWorld() at ./reactphysics3d/src/engine/PhysicsWorld.cpp:165
#7	0x000000010541b2a4 in reactphysics3d::PhysicsWorld::~PhysicsWorld() at ./reactphysics3d/src/engine/PhysicsWorld.cpp:131
#8	0x00000001054067a4 in reactphysics3d::PhysicsCommon::deletePhysicsWorld(reactphysics3d::PhysicsWorld*) at ./reactphysics3d/src/engine/PhysicsCommon.cpp:260
#9	0x000000010540a730 in reactphysics3d::PhysicsCommon::destroyPhysicsWorld(reactphysics3d::PhysicsWorld*) at ./reactphysics3d/src/engine/PhysicsCommon.cpp:248

superlcr avatar Mar 22 '24 14:03 superlcr