Crash when dragging modifiers in Outliner #82945
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#82945
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?
System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66
Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-22 18:21, hash:
7bab87c119
Worked: (newest version of Blender that worked as expected)
Short description of error
Crash when dragging modifiers in Outliner.
Exact steps for others to reproduce the error
From the default startup file:
First two steps already done in #82945.blend
Added subscriber: @erik85
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm, same thing does not happen when doing similar with make links > modifiers, then Undo.
ParticleSystemModifierData lacks a psys here:
Added subscriber: @ce3po
Added subscriber: @mont29
Need to double check that, NULL psys here seems suspicious, but might actually be expected...
Added subscriber: @brecht
sigh This is actually a critical design flow in both ParticleSystem and DynamicPaint modifiers/systems, who store a pointer to some non-ID data that they do not own (the particle system,
psys
).Then when copying those modifiers' data towards a new object, the
psys
pointers keep pointing at the one from the original object, not the new one owning the new modifiers.This simply cannot work, think reference to the psys here should be stored as name (as we do e.g. for vgroups). This is the only way to be decoupled from a specific object (tbh, am not even sure how this did not backfire at us much more, I would expect this issue to also be a problem in CoW/despgraph context e.g.).
Note that DynamicPaint modifier seems to also have same issues with its
canvas
andbrush
pointers, but think here we could rather treat those pointers as runtime data (and hence reset them to NULL on copy), since there can only be one brush/canvas per object currently?@brecht summoning you here to get a second opinion.
Raising to high as this is a fairly critical design flow, even though not technically a regression...
I think both the modifier and particle system are part of the same object datablock, so I'm not sure this is strictly against the Blender design?
Copying the particle system modifier should also copy the particle system, and remapping the pointer would be done along with that. For dynamic paint it's not obvious what it should do, if there is no particle system with the same name on the target object I guess any particle system pointer should be cleared.
Or copying these modifier could just not be supported for now.
If it helps, the new operator I made to copy modifiers to selected objects (D9537) also copies the particle system to the new object if a particle system with the same settings doesn't exist already.
This should not be handled at operator level, as copying of modifiers happens every time you copy and Object ID (including CoW copying e.g.).
@brecht the problem is that modifier copy code has no way to tell for which object it is copying data, and it should most definitively never add dependency to new IDs (like what would happen if creating a new particle system using a new particle settings).
That is why I don't think it should hold pointers to data that do not belong to itself, because it should not and cannot manage that data properly. So a lose reference (by names) should be used instead, just like what we do with e.g. vertex groups.
[EDIT] And then higher-level code (operators) can actually duplicate or add other data as needed.
Not supporting duplication of those modifiers is not an option, again because it would break depsgraph/CoW handling.
I agree that the design is not great here, and I hope that with a new particle system we simply store all settings in the modifier / node rather than in a separate list somewhere.
However I don't think that a loose coupling based on name really improves the situation. You'd still need all the same code to make sure the particle system is copied along with the modifier, and new code will be needed to keep the link valid when the particle system is renamed. It makes things safer against crashes, but does not really improve the architecture in my opinion.
I suggest putting the code from D9537: Copy a single modifier to all selected objects. into a function that can be reused for the outliner, and ensure we get the design right when a new particle system is added.
CoW should work correctly by the way, since
BKE_object_copy_particlesystems
updates the pointers.Huuuu yes indeed.... this is soooo fragile. Will at least add proper comments in code about this exception handling :(
OK, sounds like a reasonable workaround/temp solution.
This issue was referenced by
c2e6969c56
This issue was referenced by
bc95c249a7
Changed status from 'Confirmed' to: 'Resolved'