Registering a NodeSocket already registered by Blender crashes the software #90329

Open
opened 2021-07-30 20:26:32 +02:00 by Maxime Casas · 6 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.63

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b8
Worked: (newest version of Blender that worked as expected)

Short description of error
Calling bpy.utils.register_class on a node socket class that is already registered by Blender crashes the software (NodeSocketGeometry for instance). This does not happen for all classes. For instance, trying to register the class NodeSocket simply produces an error message in the console stating that this action is not possible as the class is already registered.

See the file below containing a script triggering the crash. The crash file is also provided.

Step to reproduce the error

  • Open .blend file
  • Run the script

BlenderRegistrationCrash.blend

blender.crash.txt

 	blender.exe!rna_NodeSocket_register(Main * UNUSED_bmain, ReportList * reports, void * data, const unsigned char * identifier, int(*)(PointerRNA *, void *, int *) validate, int(*)(bContext *, PointerRNA *, FunctionRNA *, ParameterList *) call, void(*)(void *) free) Line 2777	C
 	blender.exe!pyrna_register_class(_object * UNUSED_self, _object * py_class) Line 8953	C
 	[External Code]	
 	blender.exe!python_script_exec(bContext * C, const unsigned char * fn, Text * text, ReportList * reports, const bool do_jump) Line 127	C
 	blender.exe!BPY_run_text(bContext * C, Text * text, ReportList * reports, const bool do_jump) Line 224	C
 	blender.exe!text_run_script(bContext * C, ReportList * reports) Line 767	C
 	blender.exe!text_run_script_exec(bContext * C, wmOperator * op) Line 808	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1363	C
 	blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const bool poll_only, wmEvent * event) Line 1558	C
 	blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties) Line 1607	C
 	blender.exe!ui_apply_but_funcs_after(bContext * C) Line 1027	C
 	blender.exe!ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 11357	C
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 694	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2843	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2959	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3379	C
 	blender.exe!WM_main(bContext * C) Line 650	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 562	C
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.63 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `84da05a8b8` Worked: (newest version of Blender that worked as expected) **Short description of error** Calling bpy.utils.register_class on a node socket class that is already registered by Blender crashes the software (NodeSocketGeometry for instance). This does not happen for all classes. For instance, trying to register the class NodeSocket simply produces an error message in the console stating that this action is not possible as the class is already registered. See the file below containing a script triggering the crash. The crash file is also provided. **Step to reproduce the error** - Open .blend file - Run the script [BlenderRegistrationCrash.blend](https://archive.blender.org/developer/F10247923/BlenderRegistrationCrash.blend) [blender.crash.txt](https://archive.blender.org/developer/F10247924/blender.crash.txt) ```> blender.exe!RNA_struct_free_extension(StructRNA * srna, ExtensionRNA * rna_ext) Line 784 C blender.exe!rna_NodeSocket_register(Main * UNUSED_bmain, ReportList * reports, void * data, const unsigned char * identifier, int(*)(PointerRNA *, void *, int *) validate, int(*)(bContext *, PointerRNA *, FunctionRNA *, ParameterList *) call, void(*)(void *) free) Line 2777 C blender.exe!pyrna_register_class(_object * UNUSED_self, _object * py_class) Line 8953 C [External Code] blender.exe!python_script_exec(bContext * C, const unsigned char * fn, Text * text, ReportList * reports, const bool do_jump) Line 127 C blender.exe!BPY_run_text(bContext * C, Text * text, ReportList * reports, const bool do_jump) Line 224 C blender.exe!text_run_script(bContext * C, ReportList * reports) Line 767 C blender.exe!text_run_script_exec(bContext * C, wmOperator * op) Line 808 C blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1363 C blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const bool poll_only, wmEvent * event) Line 1558 C blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties) Line 1607 C blender.exe!ui_apply_but_funcs_after(bContext * C) Line 1027 C blender.exe!ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 11357 C blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 694 C blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2843 C blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2959 C blender.exe!wm_event_do_handlers(bContext * C) Line 3379 C blender.exe!WM_main(bContext * C) Line 650 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 562 C ```
Author

Added subscriber: @troopy28

Added subscriber: @troopy28

#103055 was marked as duplicate of this issue

#103055 was marked as duplicate of this issue
Member

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

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

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscribers: @d_dzyuba, @OmarEmaraDev

Added subscribers: @d_dzyuba, @OmarEmaraDev

FYI: Replacing the 'official' Radeon ProRender 3.5.0 with the later 'unofficial' 3.5.2 version fixed this '#103055: Blender 3.4 Crashes upon exit' issue for me -- although I had to start Blender in the factory default mode in order to uninstall the offending add-on (otherwise, attempting to disable it crashed Blender on the spot).

FYI: Replacing the 'official' Radeon ProRender 3.5.0 with the later 'unofficial' 3.5.2 version fixed this '#103055: Blender 3.4 Crashes upon exit' issue for me -- although I had to start Blender in the factory default mode in order to uninstall the offending add-on (otherwise, attempting to disable it crashed Blender on the spot).
Philipp Oeser removed the
Interest
Python API
label 2023-02-10 09:04:31 +01: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#90329
No description provided.