WIP: Add a mechanism to abort a blend file reading on critical error. #105085
Closed
Bastien Montagne
wants to merge 1 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
mont29:F-abort-file-reading
into main
pull from: mont29:F-abort-file-reading
merge into: blender:main
blender:main
blender:brush-assets-project
blender:universal-scene-description
blender:fix-121021
blender:blender-v4.1-release
blender:blender-v3.3-release
blender:blender-v3.6-release
blender:blender-v3.6-temp_wmoss_animrig_public
blender:temp-sculpt-dyntopo
blender:gpencil-next
blender:anim/animation-id-113594
blender:blender-v4.0-release
blender:blender-projects-basics
blender:bridge-curves
blender:sculpt-blender
blender:asset-browser-frontend-split
blender:asset-shelf
blender:tmp-usd-python-mtl
blender:tmp-usd-3.6
blender:blender-v3.5-release
blender:blender-v2.93-release
blender:realtime-clock
blender:sculpt-dev
blender:bevelv2
blender:xr-dev
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Bastien Montagne | 3dc8035e1f |
WIP: Add a mechanism to abort a blend file reading on critical error.
This commit introduces a new Main boolean flag that marks is as invalid. Higher-level file reading code does checks on this flag to abort reading process if needed. This is an implementation of the #105083 design task. ------------------------------ Write tests to validate at least the basics of this new mechanism. ------------------------------ Some notes: This commit also has a fix to Main freeing function in case it is in 'split' state. This should be committed separately. There is a memleak from `read_libblock`, not clear whether this is caused by the forged .blend file or this patch yet. The only actual change currently is adding a check on bScreen->scene pointer being non-NULL (related to #99836), but we likely want way more usages of this 'abort fileread'. Given the extense of the change, I do not think this should be considered for 3.5 and previous LTS releases. For these a simple 'check and assign first available scene' "fix" would probably be enough to address #99836 ? |