Crash on Node Tree Custom Property Update function #80238

Closed
opened 2 years ago by 60000 · 11 comments
60000 commented 2 years ago

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)
60000 commented 2 years ago
Poster

Added subscriber: @60000

Added subscriber: @60000
Owner

#68406 was marked as duplicate of this issue

#68406 was marked as duplicate of this issue
60000 commented 2 years ago
Poster

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.
iss commented 2 years ago
Collaborator

Added subscriber: @iss

Added subscriber: @iss
iss commented 2 years ago
Collaborator

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

Changed status from 'Needs Triage' to: 'Confirmed'
iss commented 2 years ago
Collaborator
 	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] ```
Owner

This issue was referenced by 6de33ee656

This issue was referenced by 6de33ee656e69bddcab1d3dfc85fd3ccbf033abb
Owner

This issue was referenced by 32057453ca

This issue was referenced by 32057453caad89c5f0f25cd0a3305d6682feefef
Owner

This issue was referenced by c2419cdc5e

This issue was referenced by c2419cdc5e581d6acb841f386a94a5d42f83852e
Owner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
ideasman42 closed this issue 2 years ago
ideasman42 self-assigned this 2 years ago
Owner
Added subscribers: @simon_lusenc, @ideasman42, @lichtwerk, @Jeroen-Bakker, @fclem, @angavrilov
Sign in to join this conversation.
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.91
legacy project/2.92
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.3
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Asset Browser (Archived)
legacy project/Asset Browser Project Overview
legacy project/Audio
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Asset Bundle
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Development Management
legacy project/Eevee
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/GPU / Viewport
legacy project/Grease Pencil
legacy project/GSoC
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Line Art
legacy project/Masking
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Performance
legacy project/Physics
legacy project/Pipeline, Assets & I/O
legacy project/Platform: FreeBSD
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Pose Library Basics
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Retrospective
legacy project/Sculpt, Paint & Texture
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/Triaging
legacy project/Undo
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
legacy project/Wintab High Frequency
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › EEVEE & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds Tests & Devices
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
papercut
performance
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#80238
Loading…
There is no content yet.