macOS wxFileDlg wxFD_SAVE Crashes (Issue #26129)

14 views
Skip to first unread message

bartvanstiphout

unread,
Jan 29, 2026, 2:47:41 PM (3 days ago) Jan 29
to wx-...@googlegroups.com, Subscribed
bartvanstiphout created an issue (wxWidgets/wxWidgets#26129)

Bug description:

Using the wxFileDlg on macOS with the style wxFD_SAVE will cause a fatal assertion.

Expected vs observed behaviour:

Expect: Open a file save dialog
Observed: Assert

Snippet from the docs that causes the crash on macOS

    wxFileDialog
        saveFileDialog(this, _("Save XYZ file"), "", "",
                       "XYZ files (*.xyz)|*.xyz", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
 
    if (saveFileDialog.ShowModal() == wxID_CANCEL)
        return;     // the user changed idea...

To Reproduce:

Use the above snippet and running the application will cause a fatal assertion.

Platform and version information

  • wxWidgets version 3.2.9
  • wxWidgets wxOSX
  • macOS 15.7 / Xcode


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26129@github.com>

VZ

unread,
Jan 29, 2026, 2:54:23 PM (3 days ago) Jan 29
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26129)

What does the assert say?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26129/3819953928@github.com>

bartvanstiphout

unread,
Jan 29, 2026, 3:04:09 PM (3 days ago) Jan 29
to wx-...@googlegroups.com, Subscribed
bartvanstiphout left a comment (wxWidgets/wxWidgets#26129)
Screenshot.2026-01-29.at.21.02.07.png (view on web) Screenshot.2026-01-29.at.21.02.52.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26129/3820016976@github.com>

VZ

unread,
Jan 29, 2026, 6:37:11 PM (3 days ago) Jan 29
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26129)

I can't reproduce this with the following diff in master:

diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp
index def41615c0..8982250985 100644
--- a/samples/dialogs/dialogs.cpp
+++ b/samples/dialogs/dialogs.cpp
@@ -2037,10 +2037,10 @@ void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) )
                         "Testing save file dialog",
                         wxEmptyString,
                         "myletter.doc",
-                        "Text files (*.txt)|*.txt|Document files (*.doc;*.ods)|*.doc;*.ods",
+                        "FIXME files (*.xyz)|*.xyz",
                         wxFD_SAVE|wxFD_OVERWRITE_PROMPT);

-    dialog.SetFilterIndex(1);
+    // FIXME dialog.SetFilterIndex(1);

     // This tests the (even more simplified) example from the docs.
     class EncryptHook : public wxFileDialogCustomizeHook

which is weird because I don't see any changes there compared to 3.2.

Can you see the problem in the sample with the patch above? If no, please make a minimal patch allowing to reproduce it there. TIA!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26129/3820940429@github.com>

Reply all
Reply to author
Forward
0 new messages