[macOS] Assertion in wxFileDialog in 3.2.9 (Issue #26148)

4 views
Skip to first unread message

Richard

unread,
Feb 1, 2026, 9:17:41 PM (5 hours ago) Feb 1
to wx-...@googlegroups.com, Subscribed
nobugshere created an issue (wxWidgets/wxWidgets#26148)

Bug description:

Using a debug build of 3.2.9, I get an assertion in wxFileDialog when calling wxFileSelector with wxFD_SAVE and only one filter is supplied. This does not happen in 3.2.8 and appears to have originated in PR #25854 commit 9317d44.

Expected vs observed behaviour:

The file save dialog should appear instead of the assertion message.

Stack trace:

Screenshot.2026-02-01.at.5.48.41.PM.png (view on web)

Patch or snippet allowing to reproduce the problem:

This patch to the dialogs sample will cause the error in the "File Operations->Second File Open" test (cmd-2)

diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp
index 99eddcaa24..da686d4977 100644
--- a/samples/dialogs/dialogs.cpp
+++ b/samples/dialogs/dialogs.cpp
@@ -1903,13 +1903,8 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
                                     "Test save error",
                                     wxEmptyString, wxEmptyString,
                                     s_extDef,
-                                    wxString::Format
-                                    (
-                                        "Waveform (*.wav)|*.wav|Plain text (*.txt)|*.txt|All files (%s)|%s",
-                                        wxFileSelectorDefaultWildcardStr,
-                                        wxFileSelectorDefaultWildcardStr
-                                    ),
-                                    wxFD_OPEN|wxFD_CHANGE_DIR|wxFD_PREVIEW|wxFD_NO_FOLLOW|wxFD_SHOW_HIDDEN,
+                                        "Waveform (*.wav)|*.wav",
+                                    wxFD_SAVE|wxFD_OVERWRITE_PROMPT,
                                     this
                                    );

To Reproduce:

  1. Patch the dialogs sample
  2. Build wxWdigets 3.2.9 and the sample for debug
  3. execute the sample
  4. Select "Dialogs->File Operations->Second File Open"

Platform and version information

  • wxWidgets version you use: 3.2.9 (3.2.8 does not fail)
  • wxWidgets port you use: wxOSX
  • OS and its version: macOS 15.7.3/Xcode 16.4 and macOS 26.2/Xcode 26.2


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/26148@github.com>

Reply all
Reply to author
Forward
0 new messages