Applications crash when GTK_MODULES=appmenu-gtk-module

Issue Description

Some applications stall and then segfault on startup when the GTK_MODULES=appmenu-gtk-module environment variable is set. I have specifically seen this with engrampa 1.62.2 and gimp 3.0.4

Steps to Reproduce Issue

  1. From a terminal window run GTK_MODULES=appmenu-gtk-module engrampa
  2. After a considerable delay the application will segfault instead of starting.

Expected Behavior

Applications that launch correctly under xfwm4 should launch correctly under xfwl4 too.

Additional Information

appmenu-gtk-module is a GTK3 module for displaying Macintosh-style global menus. Under xfwl4 the corresponding "appmenu" widget for xfce4-panel fails to load as well; however it fails quickly with an error message rather than segfaulting after some time.

I did try running engrampa and gimp in gdb, but my distro does not ship them compiled with enough debugging information for a backtrace to be at all meaningful, and I have not tried compiling debug versions.

Environment & Versions

  • OS distribution and version: Devuan 6 Excalibur
  • Overall Xfce version: mostly latest dev buids and/or main branches
  • xfwl4 version (git hash if not a release): fc68362f
  • libxfce4ui version (git hash if not a release): 4.21.8
  • xfce4-settings version (git hash if not a release): e7c5907e
  • GTK theme: Clearlooks-Phenix
  • Decorations theme: Agualemon
  • GPU make and model: NVidia GTX 960
  • Monitor scale factor(s): 1