BMain locking during the 'after liblink' doversion #92333
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#92333
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
in
6a850f3cc8
,Main.is_locked_for_linking
was added, and is currently only used in versioning code (both before and after liblink), to prevent adding or deleting IDs from Main.However, exceptions have already been added to allow creation of workspaces and collections in that context. And {D12722#inline-108272} adds nodetrees to the exceptions.
Problem
While preventing before-liblink doversion to add or remove any ID makes total sense, I do not understand why after-liblink doversion should have this constraint.
To me the bug fixed by the commit is a bug in the (removed) doversion code, not something inherently forbidden at this stage?
Proposed Solution
Remove that lock check altogether in after-liblink doversion.
I think however that we could use that lock on all other Mains besides the one being processed (to ensure doversion code does not create/delete things outside its own scope). And do-version code there should be smart enough to check when it runs on the local main, or a lib main, and adapt its code accordingly.
Another thing to fix is inDone inBKE_libblock_alloc
, which should assignmain->curlib
to the newly created ID'sid->lib
(and tag it as indirectly linked). That way if doversion needs to create an ID in a library context, that new ID is properly created as a 'virtual' indirectly linked data, and does not break Main consistency (even if doing stupid things like generating default brushes for a lib main).7681326acd
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @mont29
Added subscribers: @brecht, @ideasman42
Added subscriber: @JacquesLucke
Added subscriber: @HooglyBoogly