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

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

superlcr opened this issue · 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

Thanks a lot for reporting this issue. It has been fixed in the 'develop' branch and this will be released soon.

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