Freeze using override_hierarchy_create with Object level property with custom getter function #100203

Closed
opened 2022-08-04 16:20:43 +02:00 by Yann Lanthony · 10 comments

System Information
Operating system: Windows 10

Blender Version
Broken: 3.0 up to 3.4.0 Alpha (branch: master, commit date: 2022-08-03 23:20, hash: 2083b9ae54)
Worked: ?

Short description of error
If a property with a custom getter function is registered at Object type level in Python, linking an external collection and making library hierarchy overrides ends up freezing Blender.
This issue does not occur if the property does not have a getter function.

Exact steps for others to reproduce the error

  • Download the two attached blend files in the same folder.
  • Open main.blend.
  • Run the embedded script it opens on (override_freeze.py).
  • Blender should freeze.

A few extra test cases are available in the script to show other conditions under which the same code works.

main.blend

lib.blend

**System Information** Operating system: Windows 10 **Blender Version** Broken: 3.0 up to 3.4.0 Alpha (branch: master, commit date: 2022-08-03 23:20, hash: `2083b9ae54`) Worked: ? **Short description of error** If a property with a custom getter function is registered at Object type level in Python, linking an external collection and making library hierarchy overrides ends up freezing Blender. This issue does not occur if the property does not have a getter function. **Exact steps for others to reproduce the error** - Download the two attached blend files in the same folder. - Open `main.blend`. - Run the embedded script it opens on (`override_freeze.py`). - Blender should freeze. A few extra test cases are available in the script to show other conditions under which the same code works. [main.blend](https://archive.blender.org/developer/F13336393/main.blend) [lib.blend](https://archive.blender.org/developer/F13336394/lib.blend)
Author

Added subscriber: @yann-lty

Added subscriber: @yann-lty
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

I can confirm this on my system as well (with Blender 3.2.2):

System Information
Operating system: Linux-5.15.0-10041-tuxedo-x86_64-with-glibc2.35 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.141.03

I can confirm this on my system as well (with Blender 3.2.2): **System Information** Operating system: Linux-5.15.0-10041-tuxedo-x86_64-with-glibc2.35 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.141.03

Added subscriber: @iss

Added subscriber: @iss

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

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

Thread hangs on:

 	python310_d.dll!_PyCOND_WAIT_MS(_PyCOND_T * cv, _RTL_CRITICAL_SECTION * cs, unsigned long ms) Řádek 171	C
 	[Vložený rámec] python310_d.dll!PyCOND_TIMEDWAIT(_PyCOND_T *) Řádek 201	C
 	python310_d.dll!take_gil(_ts * tstate) Řádek 255	C
 	python310_d.dll!PyEval_RestoreThread(_ts * tstate) Řádek 549	C
 	python310_d.dll!PyGILState_Ensure() Řádek 1527	C
>	blender.exe!bpy_prop_boolean_get_fn(PointerRNA * ptr, PropertyRNA * prop) Řádek 602	C

 	blender.exe!RNA_property_boolean_get(PointerRNA * ptr, PropertyRNA * prop) Řádek 2169	C
 	blender.exe!rna_property_override_diff_default(Main * bmain, PropertyRNAOrID * prop_a, PropertyRNAOrID * prop_b, const int mode, IDOverrideLibrary * override, const unsigned char * rna_path, const unsigned __int64 rna_path_len, const int flags, bool * r_override_changed) Řádek 1663	C
 	blender.exe!rna_property_override_diff(Main * bmain, PropertyRNAOrID * prop_a, PropertyRNAOrID * prop_b, const unsigned char * rna_path, const unsigned __int64 rna_path_len, eRNACompareMode mode, IDOverrideLibrary * override, const eRNAOverrideMatch flags, eRNAOverrideMatchResult * r_report_flags) Řádek 422	C
 	blender.exe!RNA_struct_override_matches(Main * bmain, PointerRNA * ptr_local, PointerRNA * ptr_reference, const unsigned char * root_path, const unsigned __int64 root_path_len, IDOverrideLibrary * override, const eRNAOverrideMatch flags, eRNAOverrideMatchResult * r_report_flags) Řádek 793	C
 	blender.exe!BKE_lib_override_library_operations_create(Main * bmain, ID * local) Řádek 3256	C++
 	blender.exe!lib_override_library_operations_create_cb(TaskPool * pool, void * taskdata) Řádek 3284	C++
 	blender.exe!Task::operator()() Řádek 165	C++
 	blender.exe!tbb::internal::function_task<Task>::execute() Řádek 1060	C++
Thread hangs on: ``` python310_d.dll!_PyCOND_WAIT_MS(_PyCOND_T * cv, _RTL_CRITICAL_SECTION * cs, unsigned long ms) Řádek 171 C [Vložený rámec] python310_d.dll!PyCOND_TIMEDWAIT(_PyCOND_T *) Řádek 201 C python310_d.dll!take_gil(_ts * tstate) Řádek 255 C python310_d.dll!PyEval_RestoreThread(_ts * tstate) Řádek 549 C python310_d.dll!PyGILState_Ensure() Řádek 1527 C > blender.exe!bpy_prop_boolean_get_fn(PointerRNA * ptr, PropertyRNA * prop) Řádek 602 C blender.exe!RNA_property_boolean_get(PointerRNA * ptr, PropertyRNA * prop) Řádek 2169 C blender.exe!rna_property_override_diff_default(Main * bmain, PropertyRNAOrID * prop_a, PropertyRNAOrID * prop_b, const int mode, IDOverrideLibrary * override, const unsigned char * rna_path, const unsigned __int64 rna_path_len, const int flags, bool * r_override_changed) Řádek 1663 C blender.exe!rna_property_override_diff(Main * bmain, PropertyRNAOrID * prop_a, PropertyRNAOrID * prop_b, const unsigned char * rna_path, const unsigned __int64 rna_path_len, eRNACompareMode mode, IDOverrideLibrary * override, const eRNAOverrideMatch flags, eRNAOverrideMatchResult * r_report_flags) Řádek 422 C blender.exe!RNA_struct_override_matches(Main * bmain, PointerRNA * ptr_local, PointerRNA * ptr_reference, const unsigned char * root_path, const unsigned __int64 root_path_len, IDOverrideLibrary * override, const eRNAOverrideMatch flags, eRNAOverrideMatchResult * r_report_flags) Řádek 793 C blender.exe!BKE_lib_override_library_operations_create(Main * bmain, ID * local) Řádek 3256 C++ blender.exe!lib_override_library_operations_create_cb(TaskPool * pool, void * taskdata) Řádek 3284 C++ blender.exe!Task::operator()() Řádek 165 C++ blender.exe!tbb::internal::function_task<Task>::execute() Řádek 1060 C++ ```

Added subscriber: @mont29

Added subscriber: @mont29

Uhu... well yes, python code can only be executed in main thread... :(

I guess we'll have no choice but to exclude those IDs from threaded override diff processing. There will be a cost on performances.

Uhu... well yes, python code can only be executed in main thread... :( I guess we'll have no choice but to exclude those IDs from threaded override diff processing. There will be a cost on performances.

This issue was referenced by 62eb21e3ce

This issue was referenced by 62eb21e3ce87451a86b8ad78b6980cd8c9013f89

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2022-08-12 16:23:33 +02:00
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
5 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#100203
No description provided.