[vim/vim] GVim Gtk-critical message on resize (Issue #17279)

14 views
Skip to first unread message

berggeist

unread,
May 8, 2025, 12:42:44 PM5/8/25
to vim/vim, Subscribed
berggeist created an issue (vim/vim#17279)

Steps to reproduce

After patch 9.1.1368: GTK3 and GTK4 will drop numeric cursor support the Gtk warning for missing Cursor icons are finally gone. Thanks a lot for fixing this issue!

Now I get occasionally the following warnings when resizing the Gvim window on Ubuntu 24.04 on wayland.
(WAYLAND_DISPLAY ist set)

Gtk-CRITICAL **: 18:29:47.098: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed

and/or

Gdk-WARNING **: 18:32:30.483: gdk-frame-clock: layout continuously requested, giving up after 4 tries

Expected behaviour

No Gtk or Gdk warnings will appear when resizing the Gvim window

Version of Vim

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled May 8 2025 15:01:50) Included patches: 1-1370 Huge version with GTK3 GUI

Environment

Operating system: Ubuntu 24.04 with wayland

Logs and stack traces

Gtk-CRITICAL **: 18:29:47.098: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed
Gdk-WARNING **: 18:32:30.483: gdk-frame-clock: layout continuously requested, giving up after 4 tries


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279@github.com>

Christian Brabandt

unread,
May 8, 2025, 5:50:52 PM5/8/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17279)

Are those are just warnings, despite being critical? And only in Wayland mode?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2864417286@github.com>

Christian Brabandt

unread,
May 9, 2025, 4:47:14 AM5/9/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17279)

also reported on vim-dev here and here. @dvogel any ideas?

How serious is this please? Shall we revert it?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2865699663@github.com>

berggeist

unread,
May 9, 2025, 7:03:49 AM5/9/25
to vim/vim, Subscribed
berggeist left a comment (vim/vim#17279)

It also happens when not in Wayland mode, i.e when GVIM_ENABLE_WAYLAND is unset.

But then resizing GVim when in Visual mode looks much worse (same behavior as before applying the patch):

Screenshot.from.2025-05-09.12-29-25.png (view on web)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2866128756@github.com>

berggeist

unread,
May 9, 2025, 7:12:44 AM5/9/25
to vim/vim, Subscribed
berggeist left a comment (vim/vim#17279)

In my opinion no time should be wasted with reverting the patch. I would assume its more helpful to invest time into fixing this Gtk messages, because other then spamming the terminal there are no obvious issues.

The Gtk-Criticial messages seem to be related with the guioption:

In my default vimrc I've set the following:

set guioptions-=m
set guioptions-=T

with the result that two Gtk-Critical messages are shown on startup of Gvim.

when setting this to

set guioptions-=m
"set guioptions-=T

I do not see this Gtk-Critical messages anymore.

But when setting this to

"set guioptions-=m
set guioptions-=T

everytime I try to resize the GVim narrower than the menu the Gtk-Critical messages are displayed.

Hope this information helps.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2866153217@github.com>

Drew Vogel

unread,
May 9, 2025, 9:12:08 AM5/9/25
to vim/vim, Subscribed
dvogel left a comment (vim/vim#17279)

The GTK-CRITICAL message that @berggeist is reporting here is very, very old. I can reproduce it with versions going all the way back to v9.1.0000. I can trigger it by setting the initial window geometry sufficiently narrow (even without the menubar to toolbar):

gvim --clean -u NONE -U NONE -N -g -c 'set guioptions=' -geometry 15x25

I don't think the critical label means it is critical for Vim. I think the GTK project marks that as critical because normal user interactions should never encounter the issue. If it occurred under normal GUI interactions it would indicate a bug in the GTK sizing algorithm. However GTK makes pretty unconventional use of GTK, trying to match the GUI shell size to columns and lines so I wouldn't be surprised if it could also be reproduced in cases beyond startup geometry setting. However, even with v9.1.1368, I cannot reproduce it while trying to resize the window narrower than the menubar. For me the resizing interaction just stops resizing the window once it reaches the width of the menubar. @berggeist

I cannot reproduce it with v9.0.000 so it should be possible to bisect to identify the cause but I don't think it is related to any of the other reported issues.

@berggeist when you switch to X11 mode, does this message still occur? I was unable to reproduce this one.

Gdk-WARNING **: 18:32:30.483: gdk-frame-clock: layout continuously requested, giving up after 4 tries


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2866483577@github.com>

Drew Vogel

unread,
May 9, 2025, 9:17:41 AM5/9/25
to vim/vim, Subscribed
dvogel left a comment (vim/vim#17279)

re: this report on vim-dev:

ordinarily, when i start a raw gvim with no size specified, it assumes the same
size as the X-window it was started from -- i am attaching a picture of what
happens now, complete with error messages

i get the same tiny window if there's a -geometry request in the starting script,
and the same errors

There seems to be something going on with their window manager because this isn't standard gvim behavior:

ordinarily, when i start a raw gvim with no size specified, it assumes the same
size as the X-window it was started from

However, whatever is trying to set the initial window geometry is being confused by something and triggering the same issue as if the user had specified the same too-narrow geometry with the -geometry option.

re: the other reports on vim-dev, I don't have enough info to reproduce. You should feel free to revert the patch if you get more info identifying it as a culprit. I'll be AFK most of the next 10 days but I can investigate more when I return.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2866501821@github.com>

berggeist

unread,
May 9, 2025, 10:01:21 AM5/9/25
to vim/vim, Subscribed
berggeist left a comment (vim/vim#17279)

Generally I avoid to use GVim when GVIM_ENABLE_WAYLAND is not set. See the messed up screenshot above.

I tried to reproduce this message

Gdk-WARNING **: 18:32:30.483: gdk-frame-clock: layout continuously requested, giving up after 4 tries

and came to the conclusion, if:

  • a large file is loaded (in my case vim/src/main.c)
  • especially with very long lines (I joined some source code lines until they wrapped multiple times)
  • and syntax is enabled
  • and the GVim window is resized abruptly

there is a high change to generate these messages.

As soon as syntax is off these messages are gone.

Maybe it depends even on the performance of the computer, i.e. with poor performance the messages will appear more often than with a more powerful computer.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/2866664815@github.com>

Christian Brabandt

unread,
May 10, 2025, 8:53:30 AM5/10/25
to vim/vim, Subscribed

Closed #17279 as completed via d8ebccb.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/17279/issue_event/17602075422@github.com>

gserl

unread,
2:44 AM (7 hours ago) 2:44 AM
to vim/vim, Subscribed
gserl left a comment (vim/vim#17279)

Still getting these Gdk-WARNING **: 18:32:30.483: gdk-frame-clock: layout continuously requested, giving up after 4 tries log spams whenever I resize gvim (version 9.2)


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17279/4515908664@github.com>

Reply all
Reply to author
Forward
0 new messages