The official Blender project repository.
Find a file
Eoin Mcloughlin 5ee7d02840 Fix #91369: Remove physics constraint references to avoid crash on undo
Fixes #91369, where a pointer to a deleted btTypedConstraint instance
was being dereferenced, causing a crash.

What was happening was:
1. When the animation starts the first time, BKE_rigidbody_rebuild_sim
  eventually calls btDiscreteDynamicsWorld::addConstraint, which in turn
  will store a pointer to the btTypedConstraint in
  btRigidBody::m_constraintRefs for each body in the constraint
2. When undoing, the btDynamicsWorld is deleted, then the Object
  containing the btTypedConstraint (taking the btTypedConstraint with
  it) - however, the pointer to the btTypedConstraint is still in the
  btRigidBody!
3. When playing the animation a second time, rigidbody_update_simulation
  will rebuild the simulation, which causes RB_body_delete to be called,
  which iterates over all the body's m_constraintRefs and dereferences
  the deleted pointer.

Co-authored-by: Eoin Mcloughlin <hkeoin@eoinrul.es>
Pull Request: https://projects.blender.org/blender/blender/pulls/126079
2024-08-08 14:05:14 +02:00
.gitea
.github
build_files Libs: Update Python version to 3.11.9 2024-08-08 11:20:49 +02:00
doc
extern
intern Fix #91369: Remove physics constraint references to avoid crash on undo 2024-08-08 14:05:14 +02:00
lib
locale
release
scripts Fix #124691: Custom bone wire rendering broken on Mac 2024-08-08 11:19:12 +02:00
source Fix #125946: Crash when adding compositor node 2024-08-08 13:54:22 +02:00
tests Anim: Remove empty FCurves from layered Actions 2024-08-08 11:06:49 +02:00
tools Cleanup: Formatting 2024-08-08 13:05:14 +02:00
.clang-format
.clang-tidy
.editorconfig
.git-blame-ignore-revs
.gitignore
.gitmodules
AUTHORS
CMakeLists.txt
COPYING
GNUmakefile
make.bat
pyproject.toml
README.md

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.