GN mesh to curve to mesh causes hard crash with cage display #95479
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#95479
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.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65
Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-02 15:25, hash:
43b0ff3054
Also broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash:
f1cca30557
Also broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-02-03 13:54, hash:
5920de9247
Short description of error
Cage display of geometry nodes mesh-to-curve -> curve to mesh causes hard crash with at least some geometry inputs.
Exact steps for others to reproduce the error
File has an object selected (with some verts selected)
Won't crash if we disable cage display. Won't crash if we only output the curve, without a profile definition. Will still crash if we use a different profile (like a curve circle.)
Numpad period is not necessary to for the crash; the cage display is generally unstable. Zooming is just a way to reliably crash right away in the file I provided.
Test File:
GNcurveAutotiltBug6.blend
GNcurveAutotiltBug6.crash.txt
Added subscriber: @vasiln
Added subscriber: @HooglyBoogly
Hmm, I can't reproduce a crash zooming, selecting, or toggling cage display. I wonder if others can. I'm using latest master,
b73d3b80fdcb724
.It's not impossible that it's a video card thing, although I did download updated drivers just in case.
Missed more recent builds since the beta was latest on the downloads page; I'll check with the alpha I see there now.
Edit: Still broken in 3.2.0 Alpha, branch: master, commit date: 2022-02-03 13:54, hash:
5920de9247
Added subscriber: @PratikPB2123
Changed status from 'Needs Triage' to: 'Confirmed'
Thanks for the report. Can confirm on recent 3.1.0 build from buildbot but doesn't crash on current master(
28656293c6
)On master crash was fixed between
c4bedeb018
-0379ddac7d
Relevant commit I found which probably have caused the crash on 3.1 branch
974981a637
(Just a guess, I am not sure)I can't reproduce this in 3.0.1. I can look into the 3.1 branch soon.
Added subscriber: @Sergey
Hi @Sergey, looking into this, I think it's related to your recent changes in this area, I can confirm that
974981a637
fixes this in master, but not in the realease branch. Do you mind taking a look? Thanks.Added subscriber: @Raimund58
The crash happens in 3.0 for me here.
There was a mistake done in
974981a637
which introduced some other issues and got fixed in the71b451bb62
. That brought 3.0 behavior back.The root issue seems to be in the
CD_ORIGINDEX
layer. Or, rather, in absence of it. If a modifier does not preserve mapping it is supposed to setCD_ORIGINDEX
elements toORIGINDEX_NONE
instead of deleting the layer all together.From stepping through code in the
modifier_modify_mesh_and_geometry_set
theinput_mesh
has theCD_ORIGINDEX
afterBKE_mesh_wrapper_ensure_mdata
. But themesh_output = mesh_component.release();
does not.Quick and dirty PoC to get proper behavior in this specific case: P2815: (An Untitled Masterwork)
It also makes it so that the cage is properly rendered in the edit mode: it is not expected in this file that in the object mode you see faces and don't see them in edit mode. Guess the drawing code checks for
CD_ORIGINDEX
somewhere, but this is not something we can do in the generic vertex looping function.If the geoemtry nodes modifier does not support mapping it is not to advertise
eModifierTypeFlag_SupportsMapping
. If it supports mapping (including supports mapping in some cases) it must preserve existence ofCD_ORIGINDEX
and set "unknown" mapping toORIGINDEX_NONE
.By now it doesn't seem to be a report in the area I am responsible for.
Addendum: The other possibility is to prevent geometry nodes from being applied on cage by removing
eModifierTypeFlag_SupportsMapping
flag from the modifier type info.Added subscriber: @JacquesLucke
The issue is that sometimes, a node setup supports mapping, and sometimes it does not. Users expect it to work in the cases when it makes sense. Having a single static flag for all geometry nodes modifiers is just not flexible enough.
If other code expects the
CD_ORIGINDEX
layer in this case, I'm find with adding it back if it doesn't exist like in your patch. Longer term this flag system should be refactored to support the more dynamic nature of geometry nodes, and code further down the line should be able to handle the non-existance of custom data layers.We had similar issues in the past where drawing code crashed because the set of attributes on the original and evaluated data did not match.
I don't really understand why geometry nodes modifier can not treat
CD_ORIGINDEX
in the same way as modifiers like Boolean or Subsurf and set origindex to certain value when mapping is known, and set it toORIGINDEX_NONE
when mapping is not known.While one might argue design of the modifier stack is limited, there are certain expectations about behavior of the modifier. We can not be hot-fixing design deviations of specific modifiers in the generic modifier stack evaluation function.
We can potentially save memory by removing
CD_ORIGINDEX
layers if the mapping is 1:1, but that needs to be done separately and carefully. Until then modifiers are to follow design they are expected to follow.Fair enough, adding the layers can also be moved into the modifier.
Part of the problem is that
eModifierTypeFlag_SupportsMapping
doesn't have a comment explaining what it actually expects from modifiers. I thought just not having this layer should indicate to everyone that the mapping didn't work.This is so much much a fair point.
A lot of the code considers lack of
CD_ORIGINDEX
mean 1:1 mapping. It's "ok" if the topology does not change. If it does then it leads to situations like this.Aha, I think I finally understand the problem with not having the layer. Thank you.
I'll second Jacques' point and say that it's really hard to piece together this design when it doesn't seem to be described anywhere. A comment somewhere would be very helpful.
This issue was referenced by
7935d3668a
Changed status from 'Confirmed' to: 'Resolved'