Subject: bug#31169: 26.1; Emacs 26.1 RC1 (gtk) display issues over SSH/X11 with xming/vcxsrv

From: Eli Zaretskii <[email-masked]>
Date: Wed, 18 Apr 2018 16:20:24 +0300

> From: charlie hemlock <[email-masked]>
> Date: Tue, 17 Apr 2018 20:30:33 -0400
> Cc: [email-masked]
> 
> > The Motif frame looks better, but still not entirely normal: what's that empty space to the right of the 
> window? Is that similar  to what you see locally on the GNU/Linux box?
> 
> That empty narrow space looks similar as locally launched Emacs. That narrow area is where line wrap
> indicators show up.

That's the fringe.  And that's already bad: why isn't it being
displayed?  The fringe on the left displays correctly.  Do you see
anything in the *Messages* buffer that could hint on the problem?

Maybe the Motif build bit-rotted.  Is it possible for you to try
building with Lucid instead?  If the Lucid build shows the same
problem when run locally, I think the local display problems need to
be investigated first, but I wonder how come no one else sees these
display problems, they are pretty apparent and cannot be missed.

> I also clicked the "File" button on menu bar, and got several errors below, and the File Menu did not display:
> However, Clicking the Open File icon did open the file browser .
> Related to this menu issue:
>  - https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1700319
>  - https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1700319
>  - Can't say if these are related to the original display issues discussed here or entire separate issue

This bug says the problem is fixed in GTK+ 3.22.25.  Can you try that
version of GTK+?

> % ~/release/emacs_26.1/bin/emacs -Q
> 
> (emacs:3612): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed
> 
> [[removed several repeats]]
> 
> (emacs:3612): 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
> 
> (emacs:3612): Gtk-WARNING **: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget
> (node arrow, owner GtkMenu)
> 
> (emacs:3612): 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
> 
> (emacs:3612): Gtk-WARNING **: Negative content width -11 (allocation 1, extents 6x6) while allocating
> gadget (node menuitem, owner GtkMenuItem)
> 
> (emacs:3612): Gtk-WARNING **: Negative content height -7 (allocation 1, extents 4x4) while allocating gadget
> (node menuitem, owner GtkMenuItem)

And Emacs 25, which works for you in the same setup, uses the same
version of GTK+ as the 26.1RC1 build?

> The emacs gui launches and appears ok, but core dumps as soon as I attempt anything else.
> % ~/release/emacs_26.1/bin/emacs -Q
> # click anywhere
> X protocol error: BadRequest (invalid request code or no such operation) on protocol request 130
> When compiled with GTK, Emacs cannot recover from X disconnects.
> This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
> For details, see etc/PROBLEMS.
> Fatal error 6: Aborted
> 
> But I did include that bug link in original post.   I can't say if these are closely or distantly or not related.

Those are for Emacs 23, 24, and 25, whereas you said Emacs 25 worked
for you.  So how can those be the same problems?  And if they are the
same problem, clearly the solution should be in GTK+, not in Emacs,
right?