-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes because of panic #287
Comments
Can you simplify this SVG? |
Okay, @yisibl here you go: <svg xmlns="http://www.w3.org/2000/svg" width="1080" height="2400" viewBox="0 0 1080 2400">
<rect class="rect" x="2214.0" y="866.0" width="163px" height="90px" opacity="0.1"></rect>
</svg> Looks like it's |
I have further simplified the test cases. <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<rect fill="green" x="450" y="0" width="100%" height="100%" opacity="0.99"></rect>
</svg> @RazrFalcon I confirm that this is a bug introduced in Should we add this test to panicked at crates/resvg/src/geom.rs:27:61:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
Also, I don't know if this is related, but even when it doesn't crash, resvg-js never carried over any opacity values to the PNG. I'm using fill-opacity (which is actually a better idea in my case anyway) but that's surely not quite right. |
@yisibl I assume this is out-of-viewbox rendering bug and we have a test for it already. So no need to. |
@yisibl So is there a possibility you could release a new version that depends on the latest resvg version? |
Upgrading the resvg version will take some time, so please be patient. Until then you should try resvg-js 2.5.0. |
I can confirm 2.5.0 works, 2.6.0 does not. Looking forward to the upgrade. |
thread '' panicked at /Users/runner/.cargo/git/checkouts/resvg-4b7e4ee32ad6d954/3495d87/crates/resvg/src/geom.rs:27:61:
called
Option::unwrap()
on aNone
valueFortunately this
unwrap()
is gone in the most current version of resvg.Could you publish a version that depends on the latest version? I can't seem to be able to even catch this and it crashes my server.
I think the below SVG is what's causing it:
The text was updated successfully, but these errors were encountered: