gnome-builder crashes when "View Design" tab is selected with *.ui file
$ uname -a Linux z620 5.8.0-36-lowlatency #40+21.04.1-Ubuntu SMP PREEMPT Thu Jan 7 14:04:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux $ declare -p XDG_SESSION_CLASS XDG_SESSION_DESKTOP XDG_SESSION_TYPE declare -x XDG_SESSION_CLASS="user" declare -x XDG_SESSION_DESKTOP="ubuntu" declare -x XDG_SESSION_TYPE="x11" mu@z620:~/Downloads Sat Feb 20 10:38:47 1 0 $ nvidia-detector nvidia-driver-460
Reproduce and debug the crash:
$ GDK_SYNCHRONIZE=1 gdb gnome-builder 210220_102415 GNU gdb (Ubuntu 10.1-1.6ubuntu1) 10.1.90.20210103-git Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gnome-builder... (No debugging symbols found in gnome-builder) (gdb) break glade_project_add_object Function "glade_project_add_object" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (glade_project_add_object) pending. (gdb) run window.ui Starting program: /usr/bin/gnome-builder window.ui
Single-stepping to reproduce the crash:
0x00007ffff339e515 in glade_project_add_object () from /lib/x86_64-linux-gnu/libgladeui-2.so.13 (gdb) Single stepping until exit from function glade_project_add_object, which has no line number information. (gnome-builder:481000): Gdk-WARNING **: 10:25:23.103: ../../../../../gdk/x11/gdkwindow-x11.c:5650 drawable is not a native X11 window (gnome-builder:481000): Gdk-ERROR **: 10:25:23.103: The program 'gnome-builder' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 22397 error_code 3 request_code 20 (core protocol) minor_code 0) (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.) Thread 1 "gnome-builder" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff7c4b58b in g_log_writer_default () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 (gdb)
Problem is seen when Glade is used as a plugin in gnome-builder. Opening a *.ui file is standalone Glade UI works without any crash. A similar crash happens when Glade plugin is used from within Ayatane, another IDE with Glade integration.