Changing the broken group results in a crash. #116082

Open
opened 2023-12-12 07:23:05 +01:00 by ugorek · 7 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-11-10 13:41, hash: cb5f650a5aa1

Short description of error
I coding a script to convert trees between editor types, and something went wrong in the process...
I didn't notice, but using the api I was able to somehow make a group whose name change would lead to instant crash.
Also, deleting a group or unlink a material will result in a crash.
curse.blend

Exact steps for others to reproduce the error
Open the file and delete the node.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-11-10 13:41, hash: `cb5f650a5aa1` **Short description of error** I coding a script to convert trees between editor types, and something went wrong in the process... I didn't notice, but using the api I was able to somehow make a group whose name change would lead to instant crash. Also, deleting a group or unlink a material will result in a crash. [curse.blend](/attachments/df7dc4fa-cebb-4f5c-a4a4-5368520de8eb) **Exact steps for others to reproduce the error** Open the file and delete the node.
ugorek added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-12-12 07:23:06 +01:00

I can confirm crash, but there is nothing that we can do without simple way to reproduce this from scratch with short script.

I can confirm crash, but there is nothing that we can do without simple way to reproduce this from scratch with short script.
Author

Okay, I think I've managed to restore it.

import bpy

treeFrom = bpy.data.node_groups["Geometry Nodes"]
treeTo = bpy.data.node_groups.get("Aaa") or bpy.data.node_groups.new("Aaa", 'ShaderNodeTree')

treeTo.interface.clear()
for skfFrom in treeFrom.interface.items_tree:
    skfTo = treeTo.interface.new_socket(skfFrom.bl_socket_idname, in_out=skfFrom.in_out)
    try:
        skfTo.socket_type = skfFrom.socket_type
    except:
        pass
    for pr in skfFrom.bl_rna.properties:
        if (not pr.is_readonly)and(pr.identifier!='socket_type'):
            txt = "."+pr.identifier
            txt = repr(skfTo)+txt+" = "+repr(skfFrom)+txt
            exec(txt)
            #setattr(skfTo, pr.identifier, getattr(skfFrom, pr.identifier))

@mod_moder ^

Okay, I think I've managed to restore it. ```py import bpy treeFrom = bpy.data.node_groups["Geometry Nodes"] treeTo = bpy.data.node_groups.get("Aaa") or bpy.data.node_groups.new("Aaa", 'ShaderNodeTree') treeTo.interface.clear() for skfFrom in treeFrom.interface.items_tree: skfTo = treeTo.interface.new_socket(skfFrom.bl_socket_idname, in_out=skfFrom.in_out) try: skfTo.socket_type = skfFrom.socket_type except: pass for pr in skfFrom.bl_rna.properties: if (not pr.is_readonly)and(pr.identifier!='socket_type'): txt = "."+pr.identifier txt = repr(skfTo)+txt+" = "+repr(skfFrom)+txt exec(txt) #setattr(skfTo, pr.identifier, getattr(skfFrom, pr.identifier)) ``` @mod_moder ^
Author

I have a suspicion that the installation for the shader tree .interface.items_tree[0].bl_socket_idname = 'NodeSocketGeometry' has something to do with the crash.

I have a suspicion that the installation for the shader tree `.interface.items_tree[0].bl_socket_idname = 'NodeSocketGeometry'` has something to do with the crash.

Okay, I think I've managed to restore it.

Not able to confirm crash in my default file / can't run this in factory startup.

> Okay, I think I've managed to restore it. Not able to confirm crash in my default file / can't run this in factory startup.
Author
  1. Factory Settings
  2. Geometry nodes > +New
  3. Scripnig > +New
  4. Paste and Run
  5. Shading > Shift+A
  6. Add "Aaa"
  7. Factory Settings
  8. Crash!!

@mod_moder

1. Factory Settings 2. Geometry nodes > +New 3. Scripnig > +New 4. Paste and Run 5. Shading > Shift+A 6. Add "Aaa" 7. Factory Settings 8. Crash!! @mod_moder <video src="/attachments/a5ec8a91-87ec-48e8-b75f-5c1865521ac2" title="2023-12-13 19-05-18.mp4" controls></video>

@LukasTonne Is there a chance that new node tree interface items does not use pull function of tree type to validate socket type (on assignment)?

@LukasTonne Is there a chance that new node tree interface items does not use pull function of tree type to validate socket type (on assignment)?
Iliya Katushenock self-assigned this 2023-12-13 14:25:42 +01:00
Iliya Katushenock added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2023-12-13 14:25:47 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-02-19 21:02:11 +01:00
Blender Bot added
Status
Needs Triage
and removed
Status
Resolved
labels 2024-02-22 04:48:03 +01:00
Iliya Katushenock added
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-02-22 04:48:12 +01:00

I can't reproduce this error anymore, but now i have memory leak.

I can't reproduce this error anymore, but now i have memory leak.
Sign in to join this conversation.
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
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#116082
No description provided.