Comment 9 for bug 1474188

Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 1474188] Re: inkex.py: avoid ZeroDivisionError in getDocumentUnit()

On 2016-08-30 08:54 (+0200), su_v wrote:
> As long as the changes from r13938 are in effect (adding/rewriting the
> viewBox attribute on load), this report could be considered obsolete.

The issue tracked here needs retesting once a final fix for bug #1389723
is committed (IIRC the latest series of proposed patches reverts r13938).

A test file (created with Inkscape 0.91) is attached to bug #1473955:
https://bugs.launchpad.net/inkscape/+bug/1473955/+attachment/4428280/+files/1473955-sticky-zero-width-in-viewBox.svg

Steps to reproduce:
1) launch inkscape with test file
2) run any python-based extension
   (e.g. 'Extensions > Render > Gear > Gear')

If the viewBox has not been "corrected" on-load (viewbox dimensions with
zero lengths replaced with computed value based on internal resolution
(?)), the extension will fail with the reported ZeroDivisionError.