Crash when animating Viewport visibility of Curves / GPv3 object #113182
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113182
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Linux-6.2.0-33-generic-x86_64-with-glibc2.37 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 470.199.02
Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-10-02 23:22, hash:
77057e90c936
Short description of error
There is a crash when you re-enable viewport visibility of a hair curve, if it is keyframed first.
Exact steps for others to reproduce the error
Please find attached an example file ready to be crashed with step 5.
Thank you.
Hi, thanks for the report. Can confirm the crash (present since introduction of new hair curves)
Same is true for GPv3
Crash when animating Viewport visibility of Hair Curve objectto Crash when animating Viewport visibility of Curves / GPv3 objectWill dare setting this to High priority since this is a crasher which is not so uncommon to run into
The issue is that
DEG_OBJECT_ITER
is yielding anOB_CURVES
Object
with null data, which AFAIK shouldn't happen.We can add a workaround at the draw module level, but I think this should be probably solved on the dependency graph side?
@Sergey @mont29 ?
This indeed seems to be either a depsgraph, or curves evaluation code issue. Maybe @JacquesLucke is the best man to take investigation further here then?
The bug seems to affect all geometry types, not just curves. The difference is that it crashes with curves while for other types the behavior is "just" wrong.
Steps to reproduce on a mesh object:
I couldn't quite find the root cause so far, because I don't have a deep enough understanding of how the dynamic visibility stuff works yet. Maybe @Sergey has some insight into what might go wrong here.
This is an oversight of the animated visibility optimization in the dependency graph, which tries to skip evaluation of hidden objects as much as possible. The dependency graph tracks what is being visible, or affects visible, and skips evaluation of operations which do not affect anything visible. It relies on the
OperationNode::flag & DEPSOP_FLAG_NEEDS_UPDATE
to be preserved to "recover" from situation when something got skipped from evaluation, but is needed later on.What happens with the case from this report, is that the object is first partially evaluated as hidden, the geometry component is skipped. But with the manual edit of the viewport visibility the graph is tagged for relations update, which looses the operation's flags.
A quick mitigation for this is to add
in the
DepsgraphNodeBuilder::begin_build
(after thefor (const OperationNode *op_node : graph_->entry_tags) {
).The downside of such quick change is that all tags will be considered as
DEPSOP_FLAG_DIRECTLY_MODIFIED
andDEPSOP_FLAG_USER_MODIFIED
, potentially clearing automatic caches. So to be safe, would be good to somehow preserve the direct/user modified flags somehow. Shouldn't be very hard.@JacquesLucke Is it something you can/want/have time for to dig a bit deeper? :)
Thanks for checking. I'd prefer it if you could try to come up with a proper fix. If you don't have time for this soonish, I can look into it again, sure.