Crash on Node Tree Custom Property Update function #80238

Closed
opened 2020-08-30 05:09:09 +02:00 by 6 D · 11 comments

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: 211b6c29f7
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.

bugtest.blend

**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: `211b6c29f7` 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. [bugtest.blend](https://archive.blender.org/developer/F8820441/bugtest.blend)
Author

Added subscriber: @60000

Added subscriber: @60000

#68406 was marked as duplicate of this issue

#68406 was marked as duplicate of this issue
Author

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.

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.

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
 	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]	
``` 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] ```

This issue was referenced by 6de33ee656

This issue was referenced by 6de33ee656e69bddcab1d3dfc85fd3ccbf033abb

This issue was referenced by 32057453ca

This issue was referenced by 32057453caad89c5f0f25cd0a3305d6682feefef

This issue was referenced by c2419cdc5e

This issue was referenced by c2419cdc5e581d6acb841f386a94a5d42f83852e

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2020-09-08 10:10:16 +02:00
Added subscribers: @simon_lusenc, @ideasman42, @lichtwerk, @Jeroen-Bakker, @fclem, @angavrilov
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#80238
No description provided.