Blender crashes when marking as asset in the outliner -- Apple M2 Max #120611

Open
opened 2024-04-13 16:15:56 +02:00 by Guido · 5 comments

System Information
Operating system: macOS-14.4.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 Max 1.2

Blender Version
Broken: version: 4.1.1 Release Candidate, branch: blender-v4.1-release, commit date: 2024-04-12 13:20, hash: 41d6f03ffc0a
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender quits right when right click --> 'Mark as Asset' in the outliner on a cube.

Blender.crash.txt:

Blender 4.1.1, Commit date: 2024-04-12 13:20, Hash 41d6f03ffc

bpy.ops.initial.settings() # Operator
bpy.ops.scatter5.reload_biome_library() # Operator
bpy.ops.simpletabs.update() # Operator
bpy.context.space_data.context = 'RENDER' # Property
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1)) # Operator
bpy.ops.outliner.item_activate(extend=False, deselect_all=True) # Operator
bpy.ops.asset.mark() # Operator
Data-block 'Cube' is now an asset # Info

backtrace

0 Blender 0x0000000102dfe34c BLI_system_backtrace + 56
1 Blender 0x000000010256d53c _ZL16sig_handle_crashi + 356
2 libsystem_platform.dylib 0x000000018e4d3584 _sigtramp + 56
3 Blender 0x0000000102e20808 _ZN7blender3deg24DepsgraphRelationBuilder29build_copy_on_write_relationsEPNS0_6IDNodeE + 708
4 Blender 0x0000000102e2052c _ZN7blender3deg24DepsgraphRelationBuilder29build_copy_on_write_relationsEv + 56
5 Blender 0x0000000102e2a518 _ZN7blender3deg23AbstractBuilderPipeline5buildEv + 240
6 Blender 0x0000000102e3e5d8 _Z26DEG_graph_relations_updateP9Depsgraph + 64
7 Blender 0x00000001028fc020 _ZL25scene_graph_update_taggedP9DepsgraphP4Mainb + 132
8 Blender 0x000000010328624c _ZL21ViewLayer_update_callP8bContextP10ReportListP10PointerRNAP13ParameterList + 120
9 Blender 0x00000001032214ac _Z17RNA_function_callP8bContextP10ReportListP10PointerRNAP11FunctionRNAP13ParameterList + 24
10 Blender 0x00000001033ee4c4 ZL15pyrna_func_callP15BPy_FunctionRNAP7_objectS2 + 936
11 Blender 0x0000000106982bbc _PyObject_MakeTpCall + 344
12 Blender 0x0000000106a62e9c _PyEval_EvalFrameDefault + 33812
13 Blender 0x0000000106a5a9e8 _PyEval_Vector + 200
14 Blender 0x00000001069829d4 _PyObject_FastCallDictTstate + 272
15 Blender 0x0000000106983724 _PyObject_Call_Prepend + 160
16 Blender 0x00000001069eea60 slot_tp_call + 184
17 Blender 0x0000000106982bbc _PyObject_MakeTpCall + 344
18 Blender 0x0000000106a62e9c _PyEval_EvalFrameDefault + 33812
19 Blender 0x0000000106a5a9e8 _PyEval_Vector + 200
20 Blender 0x00000001033d7804 _Z24bpy_app_generic_callbackP4MainPP10PointerRNAiPv + 412
21 Blender 0x00000001025df254 BKE_callback_exec_id + 108
22 Blender 0x00000001028fc00c _ZL25scene_graph_update_taggedP9DepsgraphP4Mainb + 112
23 Blender 0x0000000103a6df74 _ZL21object_preview_renderP11IconPreviewP15IconPreviewSize + 500
24 Blender 0x0000000103a6da18 _ZL31icon_preview_startjob_all_sizesPvP17wmJobWorkerStatus + 244
25 Blender 0x0000000102e6d714 _ZL13do_job_threadPv + 32
26 libsystem_pthread.dylib 0x000000018e4a2f94 _pthread_start + 136
27 libsystem_pthread.dylib 0x000000018e49dd34 thread_start + 8

Python backtrace

File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/startup/bl_ui/space_view3d.py", line 1211 in draw
File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls
File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1223 in draw_collapsible
File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/startup/bl_ui/space_view3d.py", line 910 in draw
File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls
File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls

Exact steps for others to reproduce the error
Open blender , right click in the outliner on any mesh (cube) and mark as asset. Then blender quits.

Only the blender.crash.txt is written. When starting with terminal, terminal isn't writing anything when blender quits.
Below there is the apple crash log, if that helps.

PS: I discovered the issue when I tried to create an asset from a cube with geometry nodes attached.
BUT with geometry nodes attached macOS crashes as well !

**System Information** Operating system: macOS-14.4.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M2 Max 1.2 **Blender Version** Broken: version: 4.1.1 Release Candidate, branch: blender-v4.1-release, commit date: 2024-04-12 13:20, hash: `41d6f03ffc0a` Worked: (newest version of Blender that worked as expected) **Short description of error** Blender quits right when right click --> 'Mark as Asset' in the outliner on a cube. Blender.crash.txt: # Blender 4.1.1, Commit date: 2024-04-12 13:20, Hash 41d6f03ffc0a bpy.ops.initial.settings() # Operator bpy.ops.scatter5.reload_biome_library() # Operator bpy.ops.simpletabs.update() # Operator bpy.context.space_data.context = 'RENDER' # Property bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1)) # Operator bpy.ops.outliner.item_activate(extend=False, deselect_all=True) # Operator bpy.ops.asset.mark() # Operator Data-block 'Cube' is now an asset # Info # backtrace 0 Blender 0x0000000102dfe34c BLI_system_backtrace + 56 1 Blender 0x000000010256d53c _ZL16sig_handle_crashi + 356 2 libsystem_platform.dylib 0x000000018e4d3584 _sigtramp + 56 3 Blender 0x0000000102e20808 _ZN7blender3deg24DepsgraphRelationBuilder29build_copy_on_write_relationsEPNS0_6IDNodeE + 708 4 Blender 0x0000000102e2052c _ZN7blender3deg24DepsgraphRelationBuilder29build_copy_on_write_relationsEv + 56 5 Blender 0x0000000102e2a518 _ZN7blender3deg23AbstractBuilderPipeline5buildEv + 240 6 Blender 0x0000000102e3e5d8 _Z26DEG_graph_relations_updateP9Depsgraph + 64 7 Blender 0x00000001028fc020 _ZL25scene_graph_update_taggedP9DepsgraphP4Mainb + 132 8 Blender 0x000000010328624c _ZL21ViewLayer_update_callP8bContextP10ReportListP10PointerRNAP13ParameterList + 120 9 Blender 0x00000001032214ac _Z17RNA_function_callP8bContextP10ReportListP10PointerRNAP11FunctionRNAP13ParameterList + 24 10 Blender 0x00000001033ee4c4 _ZL15pyrna_func_callP15BPy_FunctionRNAP7_objectS2_ + 936 11 Blender 0x0000000106982bbc _PyObject_MakeTpCall + 344 12 Blender 0x0000000106a62e9c _PyEval_EvalFrameDefault + 33812 13 Blender 0x0000000106a5a9e8 _PyEval_Vector + 200 14 Blender 0x00000001069829d4 _PyObject_FastCallDictTstate + 272 15 Blender 0x0000000106983724 _PyObject_Call_Prepend + 160 16 Blender 0x00000001069eea60 slot_tp_call + 184 17 Blender 0x0000000106982bbc _PyObject_MakeTpCall + 344 18 Blender 0x0000000106a62e9c _PyEval_EvalFrameDefault + 33812 19 Blender 0x0000000106a5a9e8 _PyEval_Vector + 200 20 Blender 0x00000001033d7804 _Z24bpy_app_generic_callbackP4MainPP10PointerRNAiPv + 412 21 Blender 0x00000001025df254 BKE_callback_exec_id + 108 22 Blender 0x00000001028fc00c _ZL25scene_graph_update_taggedP9DepsgraphP4Mainb + 112 23 Blender 0x0000000103a6df74 _ZL21object_preview_renderP11IconPreviewP15IconPreviewSize + 500 24 Blender 0x0000000103a6da18 _ZL31icon_preview_startjob_all_sizesPvP17wmJobWorkerStatus + 244 25 Blender 0x0000000102e6d714 _ZL13do_job_threadPv + 32 26 libsystem_pthread.dylib 0x000000018e4a2f94 _pthread_start + 136 27 libsystem_pthread.dylib 0x000000018e49dd34 thread_start + 8 # Python backtrace File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/startup/bl_ui/space_view3d.py", line 1211 in draw File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1223 in draw_collapsible File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/startup/bl_ui/space_view3d.py", line 910 in draw File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls File "/Applications/BLENDER/Blender 4.1.1.app/Contents/Resources/4.1/scripts/modules/bpy_types.py", line 1026 in draw_ls **Exact steps for others to reproduce the error** Open blender , right click in the outliner on any mesh (cube) and mark as asset. Then blender quits. Only the blender.crash.txt is written. When starting with terminal, terminal isn't writing anything when blender quits. Below there is the apple crash log, if that helps. PS: I discovered the issue when I tried to create an asset from a cube with geometry nodes attached. BUT with geometry nodes attached macOS crashes as well !
Guido added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-04-13 16:15:57 +02:00
Member

I am personally unable to reproduce with the system and Blender version below.

The Blender.crash.txt output you uploaded suggests a few add-ons are running. Have you confirmed this issue occurs when you run Blender with factory default settings?


@lichtwerk I'm doubtful this issue is M2 specific, but since you have a M2 Mac, can you test this as well?


PS: I discovered the issue when I tried to create an asset from a cube with geometry nodes attached.
BUT with geometry nodes attached macOS crashes as well !

Please create a seperate bug report for this issue.


System Information
Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Pro 1.2
Blender version: 4.1.1 Release Candidate, branch: blender-v4.1-release, commit date: 2024-04-12 13:20, hash: 41d6f03ffc0a

I am personally unable to reproduce with the system and Blender version below. The Blender.crash.txt output you uploaded suggests a few add-ons are running. Have you confirmed this issue occurs when you run Blender with factory default settings? --- @lichtwerk I'm doubtful this issue is M2 specific, but since you have a M2 Mac, can you test this as well? --- > PS: I discovered the issue when I tried to create an asset from a cube with geometry nodes attached. > BUT with geometry nodes attached macOS crashes as well ! Please create a seperate bug report for this issue. --- **System Information** Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Pro 1.2 Blender version: 4.1.1 Release Candidate, branch: blender-v4.1-release, commit date: 2024-04-12 13:20, hash: `41d6f03ffc0a`
Alaska added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-04-13 18:13:29 +02:00
Member

Logs suggests the crash in main thread. But Looking at the thread 51, crash occurred in library_foreach_ID_link

Logs suggests the crash in main thread. But Looking at the thread 51, crash occurred in `library_foreach_ID_link`

We've narrowed down the issue to a handler in my addon that updates a PointerProperty on context.scene.world change. I will gladly work around that crash.
This one only seems to happen with Apple M2 with Blender 4.1 and 4.2. I tested on M1 and Windows but was not able to reproduce it.

We've narrowed down the issue to a handler in my addon that updates a PointerProperty on context.scene.world change. I will gladly work around that crash. This one only seems to happen with Apple M2 with Blender 4.1 and 4.2. I tested on M1 and Windows but was not able to reproduce it.
Member

@chafouin Your add-on is working fine on some systems, but causing crashes on others (assuming your conclusion is correct). Assuming you haven't done something unreasonable, then this should probably also be fixed on the Blender side of things.

Would you be willing to share more information on how to reproduce the issue?

@chafouin Your add-on is working fine on some systems, but causing crashes on others (assuming your conclusion is correct). Assuming you haven't done something unreasonable, then this should probably also be fixed on the Blender side of things. Would you be willing to share more information on how to reproduce the issue?

Of course. I can make a stripped down version of the add-on that could help reproduce the issue, but it will take a few days as I don't own a Mac and rely on Guido to confirm if the crash is still present or not.

I actually tried to use a "try except" on the problematic part of the code, but it still crashed. The handler is persistent and added to bpy.app.handlers.depsgraph_update_pre

Here is the code for the handler:

LAST_WORLD = None
@persistent
def update_camera_world(scene):
    global LAST_WORLD

    try:
        if scene.world != LAST_WORLD:
            LAST_WORLD = scene.world
            scene.camera.data.my_pointer_property = scene.world
    except Exception as e:
        print(f'Handler {type(e)}: {e} {traceback.format_exc()}')

def register():
    bpy.app.handlers.depsgraph_update_pre.append(update_camera_world)

def unregister():
    bpy.app.handlers.depsgraph_update_pre.remove(update_camera_world)

As for the Pointer Property:

my_pointer_property: bpy.props.PointerProperty(
        name="My World Prop",
        type=bpy.types.World),
        update=update_pointer_property,

The update_pointer_property can be anything, it doesn't really matter. Even a single print in that function will make it crash.

Of course. I can make a stripped down version of the add-on that could help reproduce the issue, but it will take a few days as I don't own a Mac and rely on Guido to confirm if the crash is still present or not. I actually tried to use a "try except" on the problematic part of the code, but it still crashed. The handler is persistent and added to `bpy.app.handlers.depsgraph_update_pre` Here is the code for the handler: ```Py LAST_WORLD = None @persistent def update_camera_world(scene): global LAST_WORLD try: if scene.world != LAST_WORLD: LAST_WORLD = scene.world scene.camera.data.my_pointer_property = scene.world except Exception as e: print(f'Handler {type(e)}: {e} {traceback.format_exc()}') def register(): bpy.app.handlers.depsgraph_update_pre.append(update_camera_world) def unregister(): bpy.app.handlers.depsgraph_update_pre.remove(update_camera_world) ``` As for the Pointer Property: ```Py my_pointer_property: bpy.props.PointerProperty( name="My World Prop", type=bpy.types.World), update=update_pointer_property, ``` The update_pointer_property can be anything, it doesn't really matter. Even a single print in that function will make it crash.
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
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#120611
No description provided.