cairo.Error: invalid value from do_draw() when gtk3 theme has scrollbar stepper buttons

Bug #1639474 reported by Forest
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
meld
Fix Released
Medium
meld (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Meld barfs up a bunch of tracebacks on stderr when the desktop's gtk3 theme has scrollbar stepper buttons. This is particularly annoying when working at the command line, since all those traceback messages push everything else out of my terminal window.

Example traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/meld/diffmap.py", line 138, in do_draw
    width, height)
cairo.Error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)

It seems that DiffMap.do_draw() subtracts the combined height of the scrollbar steppers from self._scroll_height (no matter what the height is, and uses the result as the height argument to cairo.Surface.create_similar(). When self._scroll_height is only 1, that argument ends up being a negative number, which chokes cairo.

You won't see the bug unless your gtk3 theme uses scrollbar stepper buttons. To reproduce, find a theme with something like this in its gtk-3.0/gtk-widgets.css:

    -GtkScrollbar-has-backward-stepper: true;
    -GtkScrollbar-has-forward-stepper: true;
    -GtkRange-stepper-size: 15px;

I can reproduce the bug by comparing directories while using any of these themes:

Greybird-Mod
https://www.gnome-look.org/p/1015000/

Windows 8 Gtk3
https://www.gnome-look.org/p/1013223/

Clearlooks-Phenix v6
https://www.gnome-look.org/p/1013756/

DarkMint
https://www.gnome-look.org/p/1013679/

Changed in meld:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in meld:
status: Confirmed → Fix Released
Revision history for this message
Paul White (paulw2u) wrote :

Upstream report showing "RESOLVED FIXED" on 2016-11-07
So fixed in recent Ubuntu versions

Changed in meld (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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