GDK/GTK app crash in XFCE when performing drag operation (gdk_window_cache_new / gdk_x11_drag_context_find_window)
Steps to reproduce
In an application using libgtk-3.so.0, dragging a draggable object causes the application to crash. This has been seen with Firefox, thunar, gucharmap, font-manager and likely others. It seems to be related to the active Xorg session as the application does not crash when displaying it to Xorg on another computer. It also doesn't crash with apps using libgtk-x11-2.0.so.0 (e.g. pcmanfm).
Output from gdb backtrace and commands executed with --gtk-debug=all are attached. Note that the environment variable GTK_SYNCHRONIZE=1 is defined in /etc/environment and was set during the attached executions.
- Which version of GTK you are using:
$ dpkg -l | grep libgtk-3 ii libgtk-3-0:amd64 3.24.20-0ubuntu1 amd64 GTK graphical user interface library ii libgtk-3-0-dbgsym:amd64 3.24.20-0ubuntu1 amd64 debug symbols for libgtk-3-0 ii libgtk-3-bin 3.24.20-0ubuntu1 amd64 programs for the GTK graphical user interface library ii libgtk-3-bin-dbgsym 3.24.20-0ubuntu1 amd64 debug symbols for libgtk-3-bin ii libgtk-3-common 3.24.20-0ubuntu1 all common files for the GTK graphical user interface library ii libgtk-3-dev:amd64 3.24.20-0ubuntu1 amd64 development files for the GTK library $ dpkg -l | grep gnome-software rc gnome-software 3.36.1-0ubuntu0.20.04.0 amd64 Software Center for GNOME
- What operating system and version
$ lsb_release -d Description: Ubuntu 20.04.2 LTS $ uname -a Linux myhostname 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- If you built GTK yourself, the list of options used to configure the build
(Thunar:2961220): Gdk-ERROR **: 13:55:39.621: The program 'Thunar' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 64804 error_code 3 request_code 141 (Composite) minor_code 8) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Trace/breakpoint trap (core dumped)