Skip to main content
Topic: Gnome/gtk file picker crashes some programs (Read 156 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Gnome/gtk file picker crashes some programs

I apologize if this turns out to not be an Artix issue.
I initially thought that it is an issue with my window manager (niri), but I encountered the same problem on another computer with Artix Linux that uses the river window manager instead, so I wonder if anyone else here experience the same thing.

After a recent update, some Wayland-native programs crashes when opening/saving files, that is, opening the file picker.

Some examples are: zen browser, firefox, mullvad browser, inkscape.
(Note that I have MOZ_ENABLE_WAYLAND=1 to run firefox based browsers in Wayland)

It's easy to test this: Start firefox, press CTRL+o, firefox crashes.

Other Wayland-native programs such as rnote and amberol has no problem.
(These also happens to be GTK based programs?)

Programs running in XWayland also has no problem.
Forcing the programs with problems to run in XWayland with GDK_BACKEND=x11 also has no problems.

I have xdg-desktop-portal, xdg-desktop-portal-gnome, and xdg-desktop-portal-gtk installed (which niri uses for its portal implementations).
Nautilus also starts fine.

I can't figure out what the problem is, but there are some workarounds:
1.) Setting GTK_USE_PORTAL=1 makes firefox based browsers work, but inkscape still crashes.
2.) Open file picker on a program that works first (rnote or XWayland based), then opening file picker in firefox, zen browser, and inkscape now works, but mullvad browser still crashes.

Here's the error message shared by all the programs with problems:
Code: [Select]
[Parent 32501, Main Thread] WARNING: Native Windows taller than 65535 pixels are not supported: 'glib warning', file /var/tmp/build/firefox-64d9c39553ae/toolkit/xre/nsSigHandlers.cpp:187

(Mullvad Browser:32501): Gdk-WARNING **: 22:46:46.578: Native Windows taller than 65535 pixels are not supported
[Parent 32501, Main Thread] WARNING: ../gtk/gdk/wayland/gdkdisplay-wayland.c:1446: Unable to create Cairo image surface: invalid value (typically too big) for the size of the input (surface, pattern, etc.): 'glib warning', file /var/tmp/build/firefox-64d9c39553ae/toolkit/xre/nsSigHandlers.cpp:187

(Mullvad Browser:32501): Gdk-CRITICAL **: 22:46:46.596: ../gtk/gdk/wayland/gdkdisplay-wayland.c:1446: Unable to create Cairo image surface: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Exiting due to channel error.
Exiting due to channel error.
zsh: segmentation fault  mullvad-browser

Here's the list of updates:
Code: [Select]
openimagedenoise (2.3.0-2 -> 2.3.2-1)
python-pytest (1:8.3.4-1 -> 1:8.3.5-1)
racket (8.15-1 -> 8.16-1)
sdl3 (3.2.4-2 -> 3.2.6-1)
sdl2-compat (2.32.50-2 -> 2.32.52-1)
tinymist (1:0.13.2-1 -> 1:0.13.4-1)
libimagequant (4.3.3-1 -> 4.3.4-1)
libppd (2.1.0-1 -> 2.1.1-1)
libtorrent-rasterbar (1:2.0.11-1 -> 1:2.0.11-2)
ca-certificates-mozilla (3.108-1 -> 3.109-1)
ell (0.73-1 -> 0.74-1)
level-zero-loader (1.19.2-1 -> 1.20.2-1)
libnghttp2 (1.64.0-1 -> 1.65.0-1)
lib32-libnghttp2 (1.64.0-1 -> 1.65.0-1)
nss (3.108-1 -> 3.109-1)
lib32-nss (3.108-1 -> 3.109-1)
rust-analyzer (20250224-1 -> 20250304-1)
mullvad-browser-bin (14.0.5-1 -> 14.0.7-1)

Re: Gnome/gtk file picker crashes some programs

Reply #1
So the problem seems to be that the gtk file picker window size is set to an extremely large value, which is solved simply by resetting the window size with
Code: [Select]
gsettings reset org.gtk.Settings.FileChooser window-size

The reason some programs are not affected is because they use Gnome's file picker instead, and the reason setting GTK_USE_PORTAL=1 works for firefox-based browsers is because this environment variable will cause them to use Gnome's file picker instead.

Why did it works in XWayland, and why it works after opening a file picker that works, and why it happens in the first place and why in both niri and river window managers? I have no idea.