Menu

#2004 Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

Bug
open
5
2018-03-18
2018-03-16
No

SciTE Version 4.0.3 compiled for GTK+ 3.22.28 (on Arch Linux, package from Arch User Repository).

I get dozens of lines

Gtk-CRITICAL : gtk_box_gadget_distribute: assertion 'size >= 0' failed

in GtkScrollbar in my console. But I'm having a hard time narrowing down in which situations these messages occur, seems to be in certain cases when simply typing text. I don't have an output pane open and the window isn't particularly small.

Here is an excerpt from --gtk-debug=geometry output

Gtk-Message: gtk_widget_set_clip:          GtkBox 0 0 1122 769
Gtk-Message: gtk_widget_set_clip:          GtkBox 0 0 1122 769
Gtk-Message: gtk_widget_size_allocate:   GtkWindow 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:     GtkFrame 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:       SmallScroller 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:         GtkTreeView 1 1 105 21, baseline -1
Gtk-Message: gtk_widget_size_allocate:         GtkScrollbar 106 19 15 3, baseline -1

(scite:8102): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Gtk-Message: gtk_widget_set_clip:              GtkScrollbar 106 19 16 82
Gtk-Message: gtk_widget_set_clip:            SmallScroller 0 0 122 23

(scite:8102): Gtk-WARNING **: SmallScroller 0x5611275f0490 or a child called gtk_widget_queue_resize() during size_allocate().
Gtk-Message: gtk_widget_set_clip:          GtkFrame 0 0 122 23

(scite:8102): Gtk-WARNING **: GtkFrame 0x561127594510 or a child called gtk_widget_queue_resize() during size_allocate().

(scite:8102): Gtk-WARNING **: GtkWindow 0x5611271b5f80 or a child called gtk_widget_queue_resize() during size_allocate().
Gtk-Message: gtk_widget_size_allocate:   GtkWindow 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:     GtkFrame 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:   GtkWindow 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:     GtkFrame 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:       SmallScroller 0 0 122 23, baseline -1
Gtk-Message: gtk_widget_size_allocate:         GtkTreeView 1 1 105 21, baseline -1
Gtk-Message: gtk_widget_size_allocate:         GtkScrollbar 106 1 15 21, baseline -1

(scite:8102): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Gtk-Message: gtk_widget_set_clip:              GtkScrollbar 106 1 16 82
Gtk-Message: gtk_widget_set_clip:            SmallScroller 0 0 122 23

(scite:8102): Gtk-WARNING **: SmallScroller 0x5611275f0490 or a child called gtk_widget_queue_resize() during size_allocate().
Gtk-Message: gtk_widget_set_clip:          GtkFrame 0 0 122 23

(scite:8102): Gtk-WARNING **: GtkFrame 0x561127594510 or a child called gtk_widget_queue_resize() during size_allocate().

(scite:8102): Gtk-WARNING **: GtkWindow 0x5611271b5f80 or a child called gtk_widget_queue_resize() during size_allocate().
Gtk-Message: gtk_widget_size_allocate:   GtkWindow 0 0 1122 769, baseline -1
Gtk-Message: gtk_widget_size_allocate:     GtkBox 0 0 1122 769, baseline -1
Gtk-Message: gtk_widget_size_allocate:       GtkMenuBar 0 0 1122 27, baseline -1
Gtk-Message: gtk_widget_size_allocate:       GtkNotebook 0 27 1122 29, baseline -1
Gtk-Message: gtk_widget_size_allocate:         GtkLabel 7 32 70 19, baseline -1
Gtk-Message: gtk_widget_set_clip:              GtkLabel 7 32 70 19
Gtk-Message: gtk_widget_size_allocate:         GtkLabel 90 32 60 18, baseline -1

I have seen multiple bug reports from 2016 with the same messages, not sure if this is a regression.

Discussion

  • Paul E.C. Melis

    Paul E.C. Melis - 2018-03-16

    Full output from --gtk-debug=geometry

     
  • Neil Hodgson

    Neil Hodgson - 2018-03-16
    • labels: scite --> scite, scintilla, gtk
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2018-03-16

    I am not seeing these messages on GTK+ 3.22.25 (Ubuntu 17.10) or 3.22.26 (Fedora 27).

    From the geometry dump, the size warnings appear to be associated with pop-up autocompletion lists, not the main editing area's scroll bars. This is because they appear after the SmallScroller and next to a GtkTreeView. Its possible this could be verified by disabling all autocompletion code and rerunning.

    There was a sequence of autocompletion changes for GTK+ in 2014/2015: [bdfe12], [375ac7], [e4f4d9], [eb8095], [c0566b], [a1712a], and [e9f9c9].

    This could be a theme problem - maybe a theme tries to inset the presented bounds. If possible, try changing to another theme and see if this still occurs.

     

    Related

    Commit: [375ac7]
    Commit: [a1712a]
    Commit: [bdfe12]
    Commit: [c0566b]
    Commit: [e4f4d9]
    Commit: [e9f9c9]
    Commit: [eb8095]

  • Paul E.C. Melis

    Paul E.C. Melis - 2018-03-17

    Well, that was a good guess, it's definitely related to autocompletion. If I use autocompleteword.automatic=0 the issue goes away. When it's enabled I get a pretty useless scrollbar in the completion popup together with the error messages.

    But as far as I know I'm not using any particular theme. It's the vanilla package from the Arch AUR and I hadn't even heard of themes for Scite.

    So is this a bug in scite itself or a local issue?

     
  • Neil Hodgson

    Neil Hodgson - 2018-03-17

    GTK+ always uses a theme to draw UI elements and one of the main ways distributions are distinguished is by the theme(s) they choose. Most distributions no longer have a control panel to choose the theme but GNOME Tweaks can be installed to allow changing themes.

    Its possible that this is due to a recent change to GTK+ and users of other distributions will see it as they update.

     
  • Paul E.C. Melis

    Paul E.C. Melis - 2018-03-18

    Ah, you meant a GTK+ theme. Just checked: indeed, switching to a different theme in MATE changes the scrollbar behaviour. In the theme I'm using (TraditionalOK) a scrollbar gets shown regardless of the number of items in the completion list, which doesn't really work for a small number of items. Other themes apparently don't show a scrollbar until a larger number of items is in the list.

    So does that mean that the scrollbar behaviour is completely up to GTK+ and Scite has no influence over it? And I can therefore only fix it by changing my MATE theme?

     
  • Neil Hodgson

    Neil Hodgson - 2018-03-18

    The scrollbar behaviour is mostly up to GTK+ and its theme. Scintilla does get opportunities to override behaviour which is why the SmallScroller exists but its complicated to work out exactly what is being done so the right thing can be overridden.

    Avoiding the warnings in this theme might require allowing the scrollbar to be as big as it wants to be thus making the autocompletion box be big enough to hold the scrollbar. Thus, autocompletion boxes for short lists would be bigger than needed just for the items and have empty lines. Its unlikely this situation can be easily determined. I suppose an option could be added so users could choose that path.

     

Log in to post a comment.