GNOME Bugzilla – Bug 773985
cairo.Error: invalid value from do_draw() when GTK3 theme has scrollbar stepper buttons
Last modified: 2016-11-08 20:06:11 UTC
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. 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/ Looks like bug 745452 might be related.
Example traceback: Traceback (most recent call last):
+ Trace 236833
width, height)
(Bugzilla was responding with error 500 when I tried submitting this as part of the bug description.)
Thanks for the excellent reproduction description! I've just pushed a fix for this to the 3.16 branch and current master.
Thanks for taking quick action! Nitpick: The old comment a couple lines above your fix is now misleading, in that someone could easily assume the negative value check to be unnecessary once that old cairo bug is fixed.
(In reply to Forest from comment #3) > Nitpick: The old comment a couple lines above your fix is now misleading, in > that someone could easily assume the negative value check to be unnecessary > once that old cairo bug is fixed. Fair point. Fixed now.