Open youthatninja opened 3 months ago
Interesting. Thanks for the report!
I'm unable to replicate the issue. Can you please attach a zip of the blend and the template being loaded?
Yeah, I think the problem is in my user prefs after migrating from 3.6./ 4.1 I have the same crashers if I do reload scripts or load factory settings in Blender Any suggestions on how to debug this? :D
Found the issue, the crash will happen if you set the temporary editor file browser to maximized area
also found this, https://projects.blender.org/blender/blender/issues/123698 ue2rigify uses legasy undo
Confirmed crashing with access violation using the above setting on 4.1 and 4.2 blender.crash.txt
Welp I put break points all over the place where the file browser gets opened and none get triggered. My current theory is Blender is trying to interact with the settings dialog through context or something which ends up not existing in memory anymore since the area gets replaced with the file browser. Might be something to report to Blender themselves.
I haven't spotted any new report about the maximized area, plus I have no issues in other addons that use file browser
Hmmm can I please get the name of some of those addons so I can test? I wonder if it's something to do with ImportHelper / ExportHelper
Pie menu Editor - Command - External Script UVpackMaster - load preset
Heh, there is no crash on Pipline -Import -Import Asset
Yeah that's why I'm thinking it's something in the backend having to do with trying to close out of a popup. The only difference between them from what I can see is that ImportAsset isn't accessed from a dialog. I'm going to try adding that operator to the dialog and see what happens.
Yep it crashes from the dialog (bpy.types.Panel)
I wrote a simple addon that replicates how send2ue invokes the setting dialog and load/save template ImportHelper operators and can confirm it crashes.
import bpy
from bpy_extras.io_utils import ImportHelper
from bpy.types import Operator, Menu
class ExamplePanelOperator(bpy.types.Operator):
bl_idname = "object.example_panel_operator"
bl_label = "Example Panel Operator"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
return context.window_manager.invoke_popup(self, width=200)
def draw(self, context):
layout = self.layout
layout.operator("object.example_operator")
class ExampleOperator(Operator, ImportHelper):
bl_idname = "object.example_operator"
bl_label = "Open File"
def execute(self, context):
print("You clicked on the panel operator and a file browser was opened.")
return {'FINISHED'}
class ExampleMenu(Menu):
bl_idname = "TOPBAR_MT_CustomMenu"
bl_label = "Custom Menu"
def draw(self, context):
layout = self.layout
layout.operator("object.example_panel_operator")
def menu_draw_func(self, context):
self.layout.menu(ExampleMenu.bl_idname)
def register():
bpy.utils.register_class(ExampleOperator)
bpy.utils.register_class(ExamplePanelOperator)
bpy.utils.register_class(ExampleMenu)
bpy.types.TOPBAR_MT_editor_menus.append(menu_draw_func)
def unregister():
bpy.types.TOPBAR_MT_editor_menus.remove(menu_draw_func)
bpy.utils.unregister_class(ExampleMenu)
bpy.utils.unregister_class(ExamplePanelOperator)
bpy.utils.unregister_class(ExampleOperator)
if __name__ == "__main__":
register()
Thank you 🙏
Blender 4.2 RC crash on Load and Save Template in Settings Dialog