Crash when toggling edit mode on object with geometry node modifier, but only if the instanced objects material has a normal map assigned. #91838
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#91838
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: Win 10
Graphics card: GTX 1080ti
Blender Version
Broken: 2.93.4/ 2.93.5 / 3.0 alpha
Worked: -
Short description of error
I created a "radial array" geometry node group and have given object "B" this modifier.
Object "A" is being instanced via this node group into a radial array.
When toggling the edit mode on the "B" object, Blender crashes.
Blender does not crash, if i disconnect the normal map socket from the material used on object "A".
Exact steps for others to reproduce the error
crash_packed.blend
Open the blend file and press "tab". (object "B" is preselected).
Blender should crash now.
To not have it crash, disconnect the normal socked in the material.
(I added annotations in the shader editor to highlight the connection.)
I hope thats all, thank you for being awesome :)
Added subscriber: @LinoThomas
Added subscriber: @iss
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm crash on NULL dereference
P2460: (An Untitled Masterwork)
Added subscriber: @HooglyBoogly
There is a null reference in
GPU_vertformat_safe_attr_name
because theCD_TANGENT
layer does not exist. I'm not sure how related this is to geometry nodes honestly.Added subscriber: @JacquesLucke
Also can't see how geometry nodes could cause this right now, but I also didn't manage to reproduce it without geometry nodes yet.
I was able to reproduce it in a new scene:
With the file just try to enter edit mode on the selected object.
tangent_bug.blend
[EDIT: the bug I found below has been fixed separately]
I also ran into another issue in this setup, but it seems unrelated: P2566. This happens when I leave As Instance off, and when I exit edit mode on the other cube..
Looks like
me->edit_mesh->mesh_eval_cage == me->edit_mesh->mesh_eval_cage->edit_mesh->mesh_eval_cage
for some reason. This leads to infinite recursion.Added subscriber: @fclem
After digging the issue, I came to a point where it seems that
const CustomData *cd_ldata = mesh_cd_ldata_get_from_mesh(me_final);
inmesh_cd_calc_used_gpu_layers
does not contains the same layers as
CustomData *cd_ldata = (mr->extract_type == MR_EXTRACT_BMESH) ? &mr->bm->ldata : &mr->me->ldata;
inextract_tan_ex_init
which makes tangent layer generation to fail.
In
BKE_mesh_calc_loop_tangent_step_0
,DM_TANGENT_MASK_ORCO
is only added to the tangent mask if there is no uv layer.mesh_cd_calc_used_gpu_layers
does not see any UVs, thus query only orco tangent layer. ButBKE_mesh_calc_loop_tangent_step_0
will not create the tangent layer since there is a valid UV layer to query a tangent layer from, but it does not match any requested tangent layer name (because only orco was needed).I tried (P2572) to make tangent orco generation work even in the presence of valid UV layer but couldn't make it work (
CustomData_get_named_layer_index(loopdata_out, CD_TANGENT, "")
still returns -1 even afterCustomData_add_layer_named(loopdata_out, CD_TANGENT, CD_CALLOC, NULL, (int)loopdata_out_len, "");
). It not help because the rest of the generation code also assumes the same thing asBKE_mesh_calc_loop_tangent_step_0
(that orco is only here as fallback).To me all of this is quite fragile since this means everything needs to have the same behavior and be in sync for things to never fail.
The real fix is likely to fix the premise of the issue, which is that
cd_ldata
differs between eval and request. But I wouldn't know how to fix that.Based one what @fclem said and by doing some more digging I managed to reproduce the issue in a more controlled environment (and without geometry nodes, but with a small code change).
New steps to reproduce:
With the file just apply P2574 and try to enter edit mode on the selected object.
removed_uvmap_bug.blend
This may be related to the more fundamental issue that when an object with a shared mesh goes into edit mode, all objects with the same mesh will show the evaluated mesh of the object that went to edit mode:
screen_recording-2021-11-03_19.42.53.mp4
The issue had nothing to do with the Object Info node in my previous post. It was just important the geometry nodes outputs an empty mesh that does not contain the uv map. This should be perfectly legal behavior.
This issue was referenced by
00e4d665f4
Changed status from 'Confirmed' to: 'Resolved'