Skip to content

bpy.ops.node.group_ungroup() leads to Blender crash #188

@JuhaW

Description

@JuhaW

Blender 4.1.1

Executing bpy.ops.node.group_ungroup() from script or addon via Blender Vscode, leads eventually Blender crash. Executing same script or addon normally without Blender vscode, things are o&k, Sometimes it needs to execute 1 time and crash, sometimes 37 times.
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF9FF4354F0
Module : python311.dll
Thread : 00000fec

Example lines leads to crash from Blender Vscode. Make sure you have Shader editor open and object has a material, no group nodes needed.

#context.area: NODE_EDITOR

import bpy
#from mathutils import *
C = bpy.context

o = C.object
ntree = o.active_material.node_tree

win = C.window
scr = win.screen
areas = [area for area in scr.areas if area.type == 'NODE_EDITOR']
areas[0].spaces.active.node_tree = ntree
regions = [region for region in areas[0].regions if region.type == 'WINDOW']

print(areas[0].type)
print(areas[0].spaces[0].node_tree)

with bpy.context.temp_override(window=win, area=areas[0], region=regions[0], screen=scr):
		#bpy.ops.node.select_all(action='SELECT')
	print(bpy.ops.node.group_ungroup())

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions