Page MenuHome

Crash on Node Tree Custom Property Update function
Closed, ResolvedPublic


System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14

Blender Version
Broken: version: 2.83.0, branch: master, commit date: 2020-06-03 14:38, hash: rB211b6c29f771
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender crashes after using the Update function on a Custom Property added to a Node Tree that is currently visible in the Material Properties Panel. Also broken on latest 2.90 Beta.

Exact steps for others to reproduce the error
Use the Blender Python API to edit any Custom Property with an Update function on a Node Tree while the material has a slot in the current Object and the Material Properties Panel is open. If the Material Properties Panel is not opened, the crash will occur shortly after navigating back to the Material Properties Panel.

In the example blend file, the snippet of code open in the Scripting Workspace will cause the crash in the open scene. Note that modifying Material while Cube.001 is selected will not cause the crash until the Materials Property Panel is opened on Cube. However, editing Material.001 while on Cube will crash despite the material not being assigned in Cube.

Notably, the print calls inside and after the update show that the update call is occurring and the crash is happening after returning.

The crash did not seem to occur when I added a Custom Property to a Scene, as is done in the documentation example for Update functions.

Event Timeline

Looking at this again, I can get around it by creating a Custom Property on the Material, not its child Node Tree. Not sure if what I was trying is intended to be possible, but the fact that Node Tree is a subclass of ID made me think it should be.

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Sep 1 2020, 11:03 PM
 	ucrtbased.dll!00007ffd833243d7()	Unknown
 	ucrtbased.dll!00007ffd83320f13()	Unknown
>	blender.exe!aligned_free(void * ptr) Line 96	C
 	blender.exe!MEM_lockfree_freeN(void * vmemh) Line 127	C
 	blender.exe!BKE_libblock_free_data(ID * id, const bool do_id_user) Line 61	C
 	blender.exe!ntreeFreeEmbeddedTree(bNodeTree * ntree) Line 2346	C
 	blender.exe!material_free_data(ID * id) Line 135	C
 	blender.exe!BKE_libblock_free_datablock(ID * id, const int UNUSED_flag) Line 76	C
 	blender.exe!preview_id_copy_free(ID * id) Line 951	C
 	blender.exe!icon_preview_free(void * customdata) Line 1312	C
 	blender.exe!wm_jobs_timer(wmWindowManager * wm, wmTimer * wt) Line 679	C
 	blender.exe!wm_window_timer(const bContext * C) Line 1583	C
 	blender.exe!wm_window_process_events(const bContext * C) Line 1620	C
 	blender.exe!WM_main(bContext * C) Line 482	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 531	C
 	[External Code]