GTK3 menus don't work over SSH forwarding

Bug #1700319 reported by Matthew Swabey on 2017-06-25
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Critical
gtk+3.0 (Ubuntu)
High
Unassigned
Artful
High
Unassigned

Bug Description

* Impact
--------
GTK interfaces used over SSH might miss their menus

* Test case
-----------
- connect via ssh -X to a cygwin server
- start an application that is using menus (e.g virt-manager)
-> the menus should work

* Regression potential
----------------------
check that gtk softwares have working menus and look the same

Original Bug Report
-----------------------

When connecting remotely (either SSH X11 forwarding or direct to X11 server), drop down menus do not display properly.

Bug upstream in gtk3:
https://bugzilla.gnome.org/show_bug.cgi?id=780101

Client: Ubuntu 17.04 - gtk3-3.22.11-0ubuntu3
Server: Windows 10 Cygwin/X 1.19.2-1

Programs exhibiting this problem:
evince 3.24.0 (and any other gtk3 apps with menus along the top).

Patch applied to gtk3 in cygwin to fix this problem and attached to this post:
https://github.com/cygwinports/gtk3/blob/master/3.22.10-xrandr12-compat.patch

Console errors:

(evince:7390): GLib-GIO-CRITICAL **: g_dbus_proxy_get_name_owner: assertion 'G_IS_DBUS_PROXY (proxy)' failed

(evince:7390): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: The name org.freedesktop.portal.Desktop is not owned

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(evince:7390): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(evince:7390): Gtk-WARNING **: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget (node arrow, owner GtkMenu)

(evince:7390): Gtk-WARNING **: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget (node arrow, owner GtkMenu)
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(evince:7390): Gtk-WARNING **: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkModelMenuItem)

(evince:7390): Gtk-WARNING **: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkModelMenuItem)

(evince:7390): Gtk-WARNING **: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkModelMenuItem)

The attachment "Patch from https://github.com/cygwinports/gtk3/blob/master/3.22.10-xrandr12-compat.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Carlo Lobrano (c-lobrano) wrote :

Confirmed upstream and patch proposed

affects: gtk+3.0 (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → gtk+3.0 (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in gtk:
importance: Unknown → Critical
status: Unknown → Confirmed
Harry Coin (hcoin) wrote :
Download full text (5.9 KiB)

I installed this patch on 3.22.10, it did not solve the problem of no menu entries listed when menu headings chosen in virt-manager. I also tried the latest upstream version, 3.22.21, which still has the same problem via x11 and no other time.

The errors in the paste below occur when the "File" menu item is clicked once in the virt-manager via ssh / x11 forwarding (obviously it works locally). The relevant error is:

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed
a few times, followed by
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

[administrator@ceo1homenx ~]$ virt-manager --debug
[Mon, 02 Oct 2017 20:51:21 virt-manager 12201] DEBUG (cli:261) Launched with command line: /usr/share/virt-manager/virt-manager --debug
[Mon, 02 Oct 2017 20:51:21 virt-manager 12201] DEBUG (virt-manager:183) virt-manager version: 1.4.1
[Mon, 02 Oct 2017 20:51:21 virt-manager 12201] DEBUG (virt-manager:184) virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'>
[Mon, 02 Oct 2017 20:51:23 virt-manager 12201] DEBUG (virt-manager:214) PyGObject version: 3.22.0
[Mon, 02 Oct 2017 20:51:23 virt-manager 12201] DEBUG (virt-manager:218) GTK version: 3.22.10
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:496) libguestfs inspection support: False
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (systray:156) Showing systray: False
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:1037) processing cli command uri= show_window= domain=
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:1039) No cli action requested, launching default window
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (manager:203) Showing manager
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:401) window counter incremented to 1
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:161) Loading stored URIs:
qemu+ssh://<email address hidden>/system
qemu+ssh://<email address hidden>/system
qemu+ssh://<email address hidden>/system
qemu+ssh://<email address hidden>/system
qemu:///system
[Mon, 02 Oct 2017 20:51:24 virt-manager 12201] DEBUG (engine:140) Initial gtkapplication activated

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(virt-manager:12201): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(virt-manager:12201): Gtk-WAR...

Read more...

Harry Coin (hcoin) wrote :

Just to be clear: This is a regression. It worked in 3.16.

Changed in gtk:
status: Confirmed → Fix Released
Jeremy Bicha (jbicha) wrote :

fixed for Ubuntu 18.04 LTS with gtk+ 3.22.25. I'm proposing updating Ubuntu 17.10 to gtk+ 3.22.25 in LP: #1728421

Changed in gtk+3.0 (Ubuntu Artful):
importance: Undecided → High
status: New → Triaged
Changed in gtk+3.0 (Ubuntu):
status: Triaged → Fix Released
description: updated
Jeremy Bicha (jbicha) on 2017-10-30
description: updated
Jeremy Bicha (jbicha) on 2017-10-30
Changed in gtk+3.0 (Ubuntu Artful):
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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