-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
Description
Description
ngscopeclient crashes when opening any file save/open dialog on Wayland.
Environment
- OS: Fedora 43 (Wayland session, KDE Plasma)
- Desktop portals installed: xdg-desktop-portal, xdg-desktop-portal-gtk, xdg-desktop-portal-kde
Steps to Reproduce
- Launch ngscopeclient on Wayland
- Try to open any file dialog (File → Save, Export, etc.)
- Crash occurs
Error Output
ERROR: failed to get window handle
(ngscopeclient:PID): Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed
Segmentation fault (core dumped)
Backtrace
Crash occurs in GTK widget sizing code after NFD_GetNativeWindowFromGLFWWindow() fails to get a valid window handle on Wayland.
Workarounds Attempted
GTK_USE_PORTAL=0- still crashesGTK_THEME=Adwaita- still crashesGDK_BACKEND=x11- still crashes
Analysis
The issue appears to be in NFDFileBrowser.cpp:141-142 where NFD_GetNativeWindowFromGLFWWindow() fails on Wayland. The code continues with an invalid parent window handle, causing the subsequent GTK dialog to crash.
Possible Fix
NFD library may need updates for proper Wayland support, or the file dialog code needs a fallback when the native window handle cannot be obtained.