Skip to content

Fix Gtk-CRITICAL assertion in file chooser when opening files#1733

Merged
phkahler merged 1 commit into
solvespace:masterfrom
AnibalPinto:master-issue651
Jul 15, 2026
Merged

Fix Gtk-CRITICAL assertion in file chooser when opening files#1733
phkahler merged 1 commit into
solvespace:masterfrom
AnibalPinto:master-issue651

Conversation

@AnibalPinto

Copy link
Copy Markdown
Contributor

Guard SetCurrentName() and SuggestFilename() calls against being invoked on open file dialogs, where GTK's gtk_file_chooser_widget_set_current_name asserts that the action is GTK_FILE_CHOOSER_ACTION_SAVE or GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER.

Follow the same guard pattern already used in FilterChanged() and CheckForUntitledFile() in the same file.

Guard SetCurrentName() and SuggestFilename() calls against being invoked
on open file dialogs, where GTK's gtk_file_chooser_widget_set_current_name
asserts that the action is GTK_FILE_CHOOSER_ACTION_SAVE or
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER.

Follow the same guard pattern already used in FilterChanged() and
CheckForUntitledFile() in the same file.
@AnibalPinto

Copy link
Copy Markdown
Contributor Author

This PR fixes #651

@phkahler

phkahler commented Jul 15, 2026

Copy link
Copy Markdown
Member

@AnibalPinto Are you sure? I tried to reproduce #651 and don't have any problem. I go to Sketch->Image, and I select a png and it just works.

BTW I'm running Gnome on Fedora 42 I think.

@phkahler

Copy link
Copy Markdown
Member

@AnibalPinto I take that back. I do get the debug message but it doesn't crash. This PR eliminates the message.

Thank you for the contribution!

@phkahler
phkahler merged commit 9aeb715 into solvespace:master Jul 15, 2026
3 of 4 checks passed
@AnibalPinto

Copy link
Copy Markdown
Contributor Author

@phkahler Thanks for the good first issue and Linux tags 👍

@AnibalPinto
AnibalPinto deleted the master-issue651 branch July 16, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants