Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load / Save Template crash Blender 4.2 RC #39

Open
youthatninja opened this issue Jul 15, 2024 · 16 comments
Open

Load / Save Template crash Blender 4.2 RC #39

youthatninja opened this issue Jul 15, 2024 · 16 comments
Labels
Blender Bug - Awaiting Resolution The issue falls on Blender, awaiting fix but keeping issue open

Comments

@youthatninja
Copy link

youthatninja commented Jul 15, 2024

Blender 4.2 RC crash on Load and Save Template in Settings Dialog

@youthatninja youthatninja added the bug Something isn't working label Jul 15, 2024
@youthatninja youthatninja changed the title Load Template crash Blender 4.2 RC Load / Save Template crash Blender 4.2 RC Jul 15, 2024
@JoshQuake
Copy link
Collaborator

Interesting. Thanks for the report!

@JoshQuake
Copy link
Collaborator

I'm unable to replicate the issue. Can you please attach a zip of the blend and the template being loaded?

@youthatninja
Copy link
Author

youthatninja commented Jul 21, 2024

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

@youthatninja
Copy link
Author

youthatninja commented Jul 21, 2024

Found the issue, the crash will happen if you set the temporary editor file browser to maximized area
image

also found this, https://projects.blender.org/blender/blender/issues/123698
ue2rigify uses legasy undo

JoshQuake added a commit that referenced this issue Jul 22, 2024
ue2rigify
- removed legacy undo #39
@JoshQuake
Copy link
Collaborator

JoshQuake commented Jul 22, 2024

Confirmed crashing with access violation using the above setting on 4.1 and 4.2
blender.crash.txt

@JoshQuake
Copy link
Collaborator

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.

@youthatninja
Copy link
Author

I haven't spotted any new report about the maximized area, plus I have no issues in other addons that use file browser

@JoshQuake
Copy link
Collaborator

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

@youthatninja
Copy link
Author

Pie menu Editor - Command - External Script
image
UVpackMaster - load preset
image

@youthatninja
Copy link
Author

Heh, there is no crash on Pipline -Import -Import Asset

@JoshQuake
Copy link
Collaborator

JoshQuake commented Jul 28, 2024

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.

@JoshQuake
Copy link
Collaborator

JoshQuake commented Jul 28, 2024

Yep it crashes from the dialog (bpy.types.Panel)

@JoshQuake
Copy link
Collaborator

JoshQuake commented Jul 29, 2024

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()

@JoshQuake
Copy link
Collaborator

I have created a bug report for Blender here

@youthatninja
Copy link
Author

Thank you 🙏

@JoshQuake JoshQuake added Blender Bug - Awaiting Resolution The issue falls on Blender, awaiting fix but keeping issue open and removed bug Something isn't working labels Jul 30, 2024
@JoshQuake
Copy link
Collaborator

Updating with latest activity from Blender. Still no fix, but at least they are aware and trying to come up with solutions.

https://projects.blender.org/blender/blender/pulls/132041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blender Bug - Awaiting Resolution The issue falls on Blender, awaiting fix but keeping issue open
Projects
None yet
Development

No branches or pull requests

2 participants