KirilStrezikozin / BakeMaster-Blender-Addon

Welcome to BakeMaster, a powerful and feature-packed baking solution created for Blender - an open-source 3D Computer graphics software.
Other
34 stars 6 forks source link

BUG: Full Object Preset causes blender to crash #44

Closed KirilStrezikozin closed 1 year ago

KirilStrezikozin commented 1 year ago

This bug report is:

Describe the bug I'm not 100% sure about the causes of occurrence of this issue but when a Full Object Preset gets executed, sometimes it causes blender to crash.

To Reproduce Steps to reproduce the behavior:

  1. Create a full object preset
  2. Click to execute the preset Here is when I'm not totally sure: Way 1 is you expand the side register menu in the left corner when you can see operator's properties and manipulate some. Or Way 2 that led to the crash is unknown, sometimes I set up bakes and blender crashes upon full object preset execution.

Expected behavior No crashes.

Logs Stack trace is not included. In short, crash happens on thread initialization, likely at the start of the process of preset execution (which is based on plain .py files) or when operator properties get written to the register (because I included REGISTER for bl_options for the execute_preset operator . Here are python backlogs, but they turned out to not tell anything useful. Actual stuff is in the stack trace.

# Blender 3.6.2, Commit date: 2023-08-16 16:43, Hash e53e55951e7a
bpy.context.scene.bm_props.global_alep_objects_active_index = 0  # Property
bpy.context.scene.bm_props.global_alep_objects[0].use_affect = False  # Property
bpy.context.scene.bm_props.global_alep_objects[0].use_affect = True  # Property
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.context.scene.bm_props.global_alep_objects_active_index = 0  # Property
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.context.scene.bm_props.global_alep_objects_active_index = 0  # Property
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator
bpy.ops.bakemaster.execute_preset_bakemaster(filepath="C:\\Users\\kempl\\AppData\\Roaming\\Blender Foundation\\Blender\\3.6\\scripts\\presets\\bakemaster_presets\\PRESETS_FULL_OBJECT_decal_hl_uv_csh_out_maps_chnlp_bake\\bake_job.py", menu_idname="BM_MT_FULL_OBJECT_Presets", preset_label="Full Object Preset")  # Operator

# backtrace
Exception Record:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION
Exception Address     : 0x00007FF65FB35C40
Exception Module      : blender.exe
Exception Flags       : 0x00000000
Exception Parameters  : 0x2
    Parameters[0] : 0x0000000000000000
    Parameters[1] : 0xFFFFFFFFFFFFFFFF

Stack trace:
User note: long stack trace is not included on purpose.

# Python backtrace
  File "C:\Users\kempl\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\BakeMaster-Blender-Addon-Dev\presets.py", line 1528 in draw

Desktop (please complete the following information):

KirilStrezikozin commented 1 year ago