Bug#906060: Coordinate overflow when rendering

Olly Betts olly at survex.com
Wed Oct 23 20:25:44 BST 2019


Control: reassign -1 libcairo2

On Wed, Oct 23, 2019 at 02:07:43PM +0200, Simon Richter wrote:
> On Wed, Oct 23, 2019 at 09:45:11AM +1300, Olly Betts wrote:
> 
> > > This is a major showstopper for linking KiCad 5 against GTK3, so this
> > > requires us to keep GTK2 around longer.
> 
> > The debian kicad package has now using the GTK3 flavour of wxwidgets3.0
> > for many months, so has this bug been solved (at least as far as kicad
> > and wxwidgets3.0 are concerned)?
> 
> No, we rewrote the entire rendering engine so we render through wxGLCanvas
> now in most cases, with a fallback where we apply the zoom ourselves before
> rendering through Cairo directly. Hardly an ideal outcome.

Indeed not.

> > If not, I'm very unclear what (as a maintainer of wxwidgets3.0) I'm
> > expected to do given that the problem clearly seem to lie lower down the
> > stack:
> 
> > > Quick debugging has shown that the coordinates given to Cairo still make
> > > sense, even if the zoom level makes them numerically large. As I'd need
> > > significant time to debug into optimized drawing routines, I'd like to pass
> > > this on. I suspect that this is mostly an interaction between Cairo and
> > > Pixman, with an overflow happening somewhere in a conversion from double to
> > > an integer type.
> 
> In any case it's an upstream problem, either in Cairo or wx, depending on
> whether large zoom levels are supposed to work in Cairo.

I fear that having this assigned to multiple different packages is a
recipe for everybody assuming it's somebody else's problem and nobody
ever doing anything further about it.

The Cairo documentation has no mention of limits on supported zoom
levels:

https://developer.gnome.org/cairo/stable/cairo-Transformations.html#cairo-scale

Therefore I'd say this is a bug in Cairo (either it should support
arbitrary zooming limited only by the ranges of the types, or it should
clearly document the limits on zooming that it supports), and I'm
reassigning to just Cairo on that basis.

(It also seems Cairo really should support this rather than forcing all
callers who want to zoom by arbitrary amounts to work around the
limitation, and if it's too hard to Cairo to do this, I struggle to see
why it's easier for callers to handle it.)

If it's actually a Cairo documentation bug, once that's addressed this
can be assigned back and I can try to convince wx upstream they need to
somehow work around it.

Cheers,
    Olly



More information about the pkg-gnome-maintainers mailing list