Page MenuHome

ExportHelper crashes with exit code 3221226356 when called
Open, Needs Triage by DeveloperPublic


System Information
Operating system: Win 10

Blender Version
Broken: 2.80, ba6cf3cdb649, 2019-02-13, branch: blender2.7
Worked: Someone on Discord took the code, tested it in 2.79 and claims it works there.

Short description of error
When trying to call an "ExportHelper" in a "Props Dialog's" execute method, Blender crashes with the exit code "3221226356".

Exact steps for others to reproduce the error
1.) Copy, paste and execute the provided code in Blender => A new "test" panel shows up in the 3D View.
2.) Click on "Props Dialog", then on the "OK" button within the pop up. This should open the file browser, but crashes Blender.
(The "File Browser" button in the panel invokes the same ExportHelper operator and works fine...)

import bpy
from bpy_extras.io_utils import ExportHelper

class Test_Panel(bpy.types.Panel):
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_label = "Test"
    bl_category = "Test"
    def poll(cls, context):
        return True
    def draw(self, context):        
        layout = self.layout
        row = layout.row()
        row.operator('object.test_operator', text='Props Dialog')
        row = layout.row()
        row.operator('object.file_browser', text='File Browser')

class OBJECT_OT_Test(bpy.types.Operator):
    bl_idname = "object.test_operator"
    bl_label = "test operator"

    flt_prop:  bpy.props.FloatProperty(default = 0.25, min = 0, max = 1, name='')    
    def draw(self, context):
        self.layout.column().prop(self, "flt_prop", expand=True)        

    def invoke(self, context, event):
        return {'RUNNING_MODAL'}

    def execute(self, context): 
        return {'FINISHED'}

class MENU_MT_FileBrowser(bpy.types.Operator, ExportHelper):
    bl_idname = "object.file_browser"
    bl_label = "test filebrowser"    
    filename_ext= ".blend"

    filter_glob: bpy.props.StringProperty(default='*.blend', options={'HIDDEN'},)
    filepath: bpy.props.StringProperty(name="File Path", description="File path", maxlen= 1024)

    def execute(self, context):
        print("Did it!")
        return {'FINISHED'}

register, unregister = bpy.utils.register_classes_factory((OBJECT_OT_Test, MENU_MT_FileBrowser, Test_Panel))
if __name__ == "__main__":



Event Timeline

Jacques Lucke (JacquesLucke) triaged this task as Needs Information from User priority.Wed, Feb 13, 5:33 PM

I cannot reproduce this in the current build. Please check if the issue still exists.
If yes, then please start Blender from the terminal and post the output here.

G. Krause (G.Krause) raised the priority of this task from Needs Information from User to Needs Triage by Developer.Thu, Feb 14, 3:53 AM
G. Krause (G.Krause) updated the task description. (Show Details)

I have updated my Blender to yesterday's version and am unfortunately still having the same crashes.
I also updated my sample code in the first post, seems I deleted too much code when I was simplifying it. I am very sorry for that.
It should work (or rather crash) as intended now. I even added a small panel for convenience's sake.

The terminal shows:
The terminal process terminated with exit code: 3221226356

Terminal will be reused by tasks, press any key to close it.
(The latter, I guess, is because I use your VSC plugin, for which I humbly want to thank you a million times, as it stays open for a new Blender session?!)