appmenu-gtk-module makes glade crash

Bug #1805129 reported by Rick Schulz
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
appmenu-gtk-module (Ubuntu)
New
Undecided
Unassigned
glade (Ubuntu)
Confirmed
Undecided
Unassigned
vala-panel-appmenu (Ubuntu)
New
Undecided
Unassigned

Bug Description

Using Ubuntu Mate Cosmic, glade 3.22.1-2 on x86_64. Window manager is Mate. When starting glade, it first opens correctly. Upon adding a top-level component (such as a window), it crashes:

(glade:14581): Gdk-WARNING **: 12:43:44.228: ../../../../../gdk/x11/gdkwindow-x11.c:5576 drawable is not a native X11 window

(glade:14581): Gdk-ERROR **: 12:43:44.229: The program 'glade' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 25976 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.)
Trace/breakpoint trap (core dumped)

Searching for this issue shows some people who're trying to run glade on Wayland (e.g., https://ubuntu-mate.community/t/glade-application-faults/17966 https://forum.manjaro.org/t/placing-a-toplevel-object-on-glade-crashes-it/46507 ). However, I am NOT using wayland:

$ env | grep XDG_SESSION_TYPE
XDG_SESSION_TYPE=x11

Thanks for looking into this. Rick

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glade (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Allen (oinksoft) wrote :

I am experiencing the same issue with glade 3.22.1-1 in an Xfce X11 session on Ubuntu 18.04.1 LTS.

Revision history for this message
Lorenz Gillner (lorenzgillner) wrote :

I am also experiencing this issue. Glade 3.22.1 with MATE (X11) on Ubuntu 19.10.

Revision history for this message
Nicholas Tsimerekis (ntsimerekis) wrote :

Same issue with glade 3.22.2-1 on Ubuntu MATE focal.

Revision history for this message
thom (tsk) wrote :

I can add the info that:
1) Older versions of glade (i.e. 3.18) that worked before, crash with the current library set.
2) the snap version of glade does work on Ubuntu MATE focal.

Revision history for this message
Nathan Booth (toothless204) wrote :

Same issue on Ubuntu MATE 20.04 LTS with glade 3.22.2-1

Revision history for this message
Nathan Booth (toothless204) wrote :

I can also add that this issue maybe due to Ubuntu/Debian specific patches in lower levels of the stack (eg. gtk or even gdk) because downloading the upstream source for 3.22.2 and building it outside of a deb package still results in this same crash

Revision history for this message
Alexander (5-accounts) wrote :

Not a huge fan of snaps, but I was able to work around the issue and get a functioning glade instance on my 20.04 workstation by installing the image from https://snapcraft.io/glade. Since this image works I tend to agree with Nathan's assessment from comment #7.

Revision history for this message
Mohanad Lababidi (lababidy) wrote :

I want to confirm that glade worked from snap Ubuntu 20.04 as Alexander point

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Affects me too, on Ubuntu MATE 20.04.

Glade on Debian GNOME Bullseye works fine, both with Wayland and Xorg.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

The problem seems to be caused by /etc/profile.d/vala-panel-appmenu.sh that sets
GTK_MODULES="$GTK_MODULES:appmenu-gtk-module"

If one unsets that environment variable, glade works: `GTK_MODULES= glade`

That file seems to be shipped by Debian and not by upstream, if Ubuntu doesn't respond we should probably file the bug against Debian > vala-panel-appmenu.

summary: - glade crash: drawable is not a native X11 window
+ appmenu-gtk-module makes glade crash
Revision history for this message
Torsten Torell (ghtorell) wrote :

Just want to mention that:
I downloaded glade 3.38.1 as source code from glade.gnome.org and built it with meson and ninja, as instructed, on Ubuntu 20.04 Desktop. (Had to install a lot of packages to make it build, though).
When I run glade from bash cmd-line I get the message you are discussing:
(glade:20715): Gdk-WARNING **: 15:27:23.596: ../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

glade window opens up OK, and I can load my .glade-file, so it's maybe not a big issue.

Revision history for this message
thom (tsk) wrote :

I toyed around a bit based on the post #11 from Alkis Georgopoulos
(thank you for that, vala-panel-appmenu.sh is indeed the culprit, that was really really helpful)

One solution is change the exec line in the desktop file like: env GTK_MODULES=glade glade %f
this is one solution that works.

But I think a better solution would be to delete /etc/profile.d/vala-panel-appmenu.sh altogether because the environment variables GTK_MODULES and UBUNTU_MENUPROXY are both not in use in Ubuntu-MATE and AFAICT for GNOME-Desktop only.

I deleted /etc/profile.d/vala-panel-appmenu.sh
It works without problem and I think it is a bit more elegant.

Could/should the file /etc/profile.d/vala-panel-appmenu.sh be marked as a conflict against mate-desktop-environment package ?
In that case it would only be installed if the desktop is NOT Ubuntu-MATE

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.