mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
IDProperties can be embedded into one-another with no theoritical depth limit, however the code currently uses recursive patterns to process them, which means beyond a certain depth it will run out of stack memory and crash. While we cannot really prevent creating such insanely high data depth, this commit adds several safe-guards (readfile, writefile, foreach_id, and freeing processes), skipping further processing beyond a certain recursion depth (currently set at 1024, which should be both well within safety margins of any modern OS, and more than enough for any practical use-case). Issue initially reported by Ray Molenkemp (@lazydodo), thanks. This commit also contains a small refactor for the IDProperty freeing code (and IDP array resize internal logic), essentially removing public API to free IDProperties' content - all of its usages was immediately after calling MEM_delete on the same root properties, so can as well call directly IDP_FreeProperty. Finally, it fixes a potential bug related to arrays of groups freeing, where the 'do_id_user' option was not properly propagated through the array resize logic. Probably not an issue in practice though (not sure if arrays of groups are used anywhere currently?). Pull Request: https://projects.blender.org/blender/blender/pulls/160274 |
||
|---|---|---|
| .. | ||
| change_log.rst | ||
| include__bmesh.rst | ||
| info_advanced.rst | ||
| info_advanced_blender_as_bpy.rst | ||
| info_api_reference.rst | ||
| info_best_practice.rst | ||
| info_contributing.rst | ||
| info_gotcha.rst | ||
| info_gotchas_armatures_and_bones.rst | ||
| info_gotchas_crashes.rst | ||
| info_gotchas_file_paths_and_encoding.rst | ||
| info_gotchas_internal_data_and_python_objects.rst | ||
| info_gotchas_meshes.rst | ||
| info_gotchas_operators.rst | ||
| info_gotchas_threading.rst | ||
| info_overview.rst | ||
| info_quickstart.rst | ||
| info_tips_and_tricks.rst | ||