The official Blender project repository.
Go to file
Philipp Oeser 566a38ffee
Some checks are pending
buildbot/vdev-code-daily-coordinator Build started.
buildbot/vdev-code-daily-darwin-arm64 Build started.
buildbot/vdev-code-daily-windows-amd64 Build started.
buildbot/vdev-code-daily-linux-x86_64 Build done.
buildbot/vdev-code-daily-darwin-x86_64 Build done.
buildbot/vdev-code-daily-lint Build done.
Fix: Crash rendering of rigid body setup without baking dynamics first
When rendering animation without baking dynamics first, rigid body
objects/shapes might be set up for the fist time (see
`rigidbody_update_simulation`).

Here is my take on what happens when we run into the reported crash:

In `rigidbody_validate_sim_object`, `rigidbody_validate_sim_shape` can
be called (which -- amongst other things -- can call `RB_shape_delete`).
It does not set `RBO_FLAG_NEEDS_RESHAPE` nor calls
`RB_body_set_collision_shape`. It only sets `rbo->shared->physics_shape`
(which only seems to to update the "blender side of things", but not the
"bullet side of things").

Then later (still in `rigidbody_validate_sim_object`),
`RB_dworld_add_body`/ `btDiscreteDynamicsWorld::addRigidBody`>
`btCollisionWorld::addCollisionObject` > collisionObject->getCollisionShape()
 is called, but confused because we called `RB_shape_delete` before.

Also see the TODO(Sybren) comment from 98a0bcd425 (which might even be
removed with this PR, but not I havent verified "collision shape being
created twice" is now not happening anymore).

One might think that flagging `RBO_FLAG_NEEDS_RESHAPE` might be enough,
but reacting on that only happens later in `rigidbody_update_simulation`
(so not early enough to not run into the issues of `RB_dworld_add_body`
above).

So to resolve, call `RB_body_set_collision_shape` in
`rigidbody_validate_sim_shape` if we actually made a new one.

Fixes #130991

Pull Request: #131039
2024-12-06 17:14:49 +01:00
.gitea Report template: Add link to manual system information collection page 2024-11-19 01:05:52 +01:00
.github Funding: Add FUNDING.yml to link to fund.blender.org on GitHub mirror 2024-07-31 10:03:57 +02:00
build_files install_linux_packages: Add pipewire dependency. 2024-12-03 18:00:55 +01:00
doc Revert "Docs: Python API: Fix theme dependency" 2024-11-28 14:12:06 -05:00
extern Cmake: Add Pipewire support 2024-12-03 16:26:01 +01:00
intern GHOST: Fix X11 clipboard selection requests 2024-12-06 17:10:50 +01:00
lib Libs: Linux: shaderc v2024.3 Vulkan loader/headers 1.3.296 2024-12-05 14:14:39 +01:00
locale I18N: Update UI translations from git/weblate repository (f3f7d5a3593c1e). 2024-12-02 17:55:13 +01:00
release Cleanup: Remove old embedded preview_grease_pencil_legacy.blend 2024-12-02 18:07:57 +01:00
scripts UI: remove redundant undo pushes for menu operators 2024-12-07 00:41:36 +11:00
source Fix: Crash rendering of rigid body setup without baking dynamics first 2024-12-06 17:14:49 +01:00
tests Tests: Add more VSE modifiers render tests 2024-12-06 11:32:37 +02:00
tools Tools / Issues script: Print modules with 0 bugs at the end 2024-12-05 18:52:19 +01:00
.clang-format ClangFormat: Remove unused sculpt macro exceptions 2024-11-12 00:44:24 +01:00
.clang-tidy Cleanup: match declaration names, avoid shadowing & clear trailing space 2024-10-03 12:12:08 +10:00
.editorconfig editorconfig: add HTML entry 2023-12-08 13:28:13 +11:00
.git-blame-ignore-revs Cleanup: add commit to .git-blame-ignore-revs 2023-05-03 20:31:11 +10:00
.gitignore Switch SVN to Git submodules using Git-LFS 2024-02-22 13:50:55 +01:00
.gitmodules Revert "Release cycle: Blender 4.3 Beta" 2024-10-02 12:35:26 +02:00
AUTHORS AUTHORS: add 1 new author (via override) 2024-10-29 14:43:10 +11:00
CMakeLists.txt Cmake: Add Pipewire support 2024-12-03 16:26:01 +01:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile make license: command to update the license file 2024-10-18 17:09:43 +02:00
make.bat make license: command to update the license file 2024-10-18 17:09:43 +02:00
pyproject.toml pyproject.toml: correct autopep8 configuration for 2.3.1 2024-10-16 20:55:03 +11:00
README.md Docs: Replace most wiki links with links to new developer docs 2024-01-18 16:49:38 +01:00

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.