thread '<unnamed>' panicked at 'Cairo error "cairo_restore() without matching cairo_save()"'
Hi,
cairo recently added CI for its svg backend. One of the tests fails with:
unbounded-operator.svg11.rgb24 [0x1]: thread '<unnamed>' panicked at 'Cairo error "cairo_restore() without matching cairo_save()"', /builddir/build/BUILD/librsvg-2.50.6/vendor/cairo-rs/src/enums.rs:274:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
The SVG file that causes this problem can be found here for the next seven days: https://gitlab.freedesktop.org/psychon/cairo/-/jobs/10455715/artifacts/file/test/output/unbounded-operator.svg11.argb32.out.svg
I can't attach the file since my browser crashes, hence I am attaching it as a tar.gz: foo.tar.gz
I tried using the delta
tool to minify the "evil" svg file. The result of that is also in the attached file.
(I know that cairo-rs is on the way to use Result
instead of panic!
for this kind of errors - is it worth waiting for that?)
I only tried this with debian testing's librsvg version. I cannot build a newer version since debian testing's rustc is too old, so this might already be fixed.
There are four test cases in cairo's test suite that all fail with the same panic. I guess they all come from the same underlying bug, but won't be able to test. If you want, I can provide some more files to test. If you don't want, I can also just assume that this is all the same bug.