#1831 GTK3: Error messages in console when the Scintilla widget is too small

Bug
closed-fixed
5
2016-05-24
2016-05-19
No

Test case:

  1. Run SciTE from terminal (I believe this only happens since GTK+ 3.20 though I can't check right now).
  2. Set split.vertical=0.
  3. Hide the Output pane or make it really small.

Result: The terminal is spammed with the following error message:

(scite:12058): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

Running SciTE with --gtk-debug=geometry gives this useful diagnostic, indicating that the error occurs because the GtkScrollBar is allocated smaller size than the minimum requisition:

Gtk-Message: gtk_widget_size_allocate:             ScintillaObject 0 0 898 1, baseline -1
Gtk-Message: gtk_widget_size_allocate:               GtkScrollbar 0 -11 886 12, baseline -1
Gtk-Message: gtk_widget_set_clip:                    GtkScrollbar -1 -12 887 14
Gtk-Message: gtk_widget_size_allocate:               GtkScrollbar 886 0 12 1, baseline -1

(scite:17853): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to underallocate ScintillaObject's child GtkScrollbar 0x17595d0. Allocation is 12x1, but minimum required size is 12x46.

(scite:17853): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Gtk-Message: gtk_widget_set_clip:                    GtkScrollbar 885 -1 14 48
Gtk-Message: gtk_widget_size_allocate:               GtkDrawingArea 0 0 886 100, baseline -1

I'm working on a patch that checks the minimum size and never allocates smaller than that.

Related

Bugs: #1851

Discussion

  • Neil Hodgson

    Neil Hodgson - 2016-05-19

    Is this with current code from the repository? There have been changes in this area over time.

     
    • Johannes Sasongko

      Yeah, this is on the latest dev version, after the fixes to [#1825].

      The attached patch fixes this, but I've only tested it on SciTE. Basically rather than using 1 as the minimum allocation size, it checks the minimum size from gtk_widget_get_preferred_size. There is a related discussion about a similar error message in GNOME bug 754976.

       

      Related

      Bugs: #1825

  • Neil Hodgson

    Neil Hodgson - 2016-05-21
    • labels: --> scintilla, gtk
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2016-05-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks