87a98c361c052844fb58d225aec0ae6167ab2eee
There probably are more cases where crash will happen as it is rooting into the issue with BKE_object_workob_calc_parent() which is used in multiple places. The issue is caused by the access to a runtime field of workob outside of the BKE_object_workob_calc_parent(): the runtime field is stack-allocated in the function, and can not be accessed outside of the function. The easiest way to reproduce is to use ASAN, and parent mesh to an armature with automatic weights. Although, on macOS ASAN did not report issues, so setting workob->runtime to nullptr at the end of of the BKE_object_workob_calc_parent() was the easiest. The solution is simple: make the function to return the matrix, and take care of the working object inside of it, so all tricky parts are hidden from the API. The patch is targeting the main branch, as in 4.1 it is not required to do such change because all uses of the function only access object_to_world, which is stored in the object in 4.1. A double-check in the what_does_obaction() might be needed as it follows the similar pattern, but it does not seem that runtime field of the workob is accessed in usages of the what_does_obaction(). Pull Request: https://projects.blender.org/blender/blender/pulls/118847
…
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.
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.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
