dpaulat / supercell-wx

Supercell Wx is a free, open source advanced weather radar viewer.
https://supercell-wx.rtfd.io
MIT License
85 stars 14 forks source link

Crash on File Open Dialog in Linux Mint 21.3 #204

Closed Baralheia closed 1 month ago

Baralheia commented 1 month ago

Description: In Supercell WX 0.4.3 and 0.4.4 on Linux Mint 21.3, invoking a File Open dialog causes the application to crash. This occurs both with the AppImage and the tarball. If run from the Terminal, debug output suggests Supercell is unable to load theme icons due to "invalid IHDR data" but I've confirmed that the specific image that is being loaded exists and will open in an image viewer without error. This issue prevents me from changing the default alert sound or any of the color tables for the various radar products - basically anywhere a file open dialog would be invoked.

To Reproduce: In Supercell WX, go to File > Open > NEXRAD Product. Application will crash within a second or two. Alternately, go to File > Settings, select the Audio page, then click the "..." button to the right of the Sound filename. Application will crash within a second or two.

Expected Behavior: A file open dialog should appear without crashing the application.

PC Information: OS: Linux Mint 21.3 x86_64 Host: X470 AORUS ULTRA GAMING Kernel: 5.15.0-107-generic Uptime: 37 mins Packages: 2688 (dpkg) Shell: bash 5.1.16 Resolution: 5120x2880, 5120x2880 DE: Cinnamon 6.0.4 WM: Mutter (Muffin) WM Theme: Mint-Y-Dark-Purple (Mint-Y) Theme: Mint-Y-Dark-Purple [GTK2/3] Icons: Mint-Y-Purple [GTK2/3] Terminal: gnome-terminal CPU: AMD Ryzen 7 5800X (16) @ 3.800GHz GPU: AMD ATI Radeon RX 6800/6800 XT / 6900 XT Memory: 4801MiB / 32007MiB

Debug Output:

(supercell-wx:13764): Gtk-WARNING **: 18:03:14.959: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Mint-Y/legacy/16/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Mint-Y/legacy/16/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0)
Aborted (core dumped)
dpaulat commented 1 month ago

Thanks for the report. I'm able to reproduce it in a fresh install of Linux Mint 23.1. Not ideal, but you can workaround the issue in the non-AppImage version, from the bin directory:

$ cp supercell-wx supercell-wx-patched
$ sed -i s/png_/PNG_/g supercell-wx-patched
$ ./supercell-wx-patched

I'll work to figure out a proper fix for this.

dpaulat commented 1 month ago

The problem appears to lie within libqgtk3.so. You should be able to remove the .so file (plugins/platformthemes), and the application should work as normal.

I will probably end up removing this file from future distributions, and/or see if I can file a bug report with Qt (assuming I can reproduce this with a minimal example). This file is used only for GTK theming, where other themes (e.g., Fusion) likely give a better experience.