Blender Git Commit Log

Git Commits -> Revision 2ac9e85

Revision 2ac9e85 by Lukas Toenne (master)
May 14, 2014, 09:51 (GMT)
Dirty fix for memory corruption in the rigid body API.

Problem happens when removing a rigid body reference in a constraint,
and then jumping to the start frame right away. This will cause a full
rebuild of the rigid body world. However, the btRigidBodys are removed
before the constraints, and this leaves dangling pointers in the
btTypedConstraints, which causes corruption when deleting those
constraints later.

Fix for now is to explicitly delete constraints in advance when
rebuilding, while they still have valid btRigidBody pointers.

Ultimately the whole memory management and ownership of Bullet data
needs redesign. This is already happening in the particles_refactor
branch and could be ported to master separately:
https://developer.blender.org/diffusion/B/browse/particles_refactor/source/blender/blenkernel/intern/rigidbody.c

Commit Details:

Full Hash: 2ac9e8587b166884076f82f7eb54a23fd59d3111
Parent Commit: 48881ad
Lines Changed: +21, -0

1 Modified Path:

/source/blender/blenkernel/intern/rigidbody.c (+21, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021