gtk3 GDK_IS_WAYLAND_DISPLAY assertion fail with non-empty GTK_IM_MODULE
Steps to reproduce
- Set the environment variable
GTK_IM_MODULE
towayland
- Run a GTK3 app under XWayland (ex: electron based apps, JD-GUI, etc.)
- Interact with the app in any way
Current behavior
The app crashes with the following Segfault:
Gdk: gdk_wayland_display_get_wl_display: assertion 'GDK_IS_WAYLAND_DISPLAY (display)' failed Erreur de segmentation (core dumped)
Expected outcome
The app doesn't crash.
Version information
- gtk 3.24.39
- ArchLinux with Gnome DE under Wayland (using Nvidia GBM)
Additional information
Since this only happens when $GTK_IM_MODULE
is set to wayland
, I believe that this is part of why the issue happens. See also the chromium issue below that seems to provide a better stacktrace than what I could obtain.
Downstream issue on chromium bug tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=1499226&q=wl_proxy_get_version&can=2
Video reproducing the bug Capture_vidéo_du_2023-12-26_11-45-48