Skip to content
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

resvg: --export-area-drawing has no effect when --export-id is set. #677

Open
ozkriff opened this issue Oct 5, 2021 · 1 comment
Open
Labels
Projects

Comments

@ozkriff
Copy link
Owner

ozkriff commented Oct 5, 2021

Starting from the 0.16 version resvg produces weird PNGs and reports "Warning: --export-area-drawing has no effect when --export-id is set." (while I'm not event passing the --export-area-drawing argument).

@ozkriff ozkriff added the bug label Oct 5, 2021
@ozkriff ozkriff added this to To do in v0.7 via automation Oct 5, 2021
@zouharvi zouharvi mentioned this issue Oct 24, 2021
@volodalexey
Copy link

volodalexey commented Jun 15, 2023

Recent version 0.34.1 of resvg does not work.
When I run ./utils/assets_export.sh I get errors for some files:

...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/lex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/resvg-0.34.1/src/geom.rs:27:61
...

For images that don't panic I get blank images after export.

E.g. one of image that will throw an error:

RUST_BACKTRACE=full resvg --zoom=12 --export-id="poison_cloud" "assets_src/atlas.svg" "assets/img/poison_
cloud.png"


thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/lex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/resvg-0.34.1/src/geom.rs:27:61
stack backtrace:
   0:     0x56368346d53a - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x56368346d53a - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x56368346d53a - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x56368346d53a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x56368348f10f - core::fmt::write::h9ffde816c577717b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
   5:     0x56368346a795 - std::io::Write::write_fmt::h88186074961638e4
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
   6:     0x56368346d305 - std::sys_common::backtrace::_print::h184198273ed08d59
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x56368346d305 - std::sys_common::backtrace::print::h1b4d8e7add699453
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x56368346e9ae - std::panicking::default_hook::{{closure}}::h393bcea75423915a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
   9:     0x56368346e755 - std::panicking::default_hook::h48c64f31d8b3fd03
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
  10:     0x56368346ef0e - std::panicking::rust_panic_with_hook::hafdc493a79370062
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
  11:     0x56368346edc2 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:580:13
  12:     0x56368346d9a6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x56368346eb62 - rust_begin_unwind
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
  14:     0x5636832932d3 - core::panicking::panic_fmt::h0f6ef0178afce4f2
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
  15:     0x56368329336d - core::panicking::panic::h0ead933cb8f56d66
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5
  16:     0x5636832a762e - resvg::geom::fit_to_rect::h6140e3aaa6b26f6f
  17:     0x5636832c6f08 - resvg::render::render_nodes::h2d24e738ad4d2c21
  18:     0x5636832c737b - resvg::render::render_nodes::h2d24e738ad4d2c21
  19:     0x5636832a79fb - resvg::render::<impl resvg::tree::Tree>::render::he36cfaaf4dfac62c
  20:     0x56368329d55e - resvg::render_svg::h5d34e31e486d7ce5
  21:     0x563683296167 - resvg::main::he0193430cdff5d87
  22:     0x56368329df33 - std::sys_common::backtrace::__rust_begin_short_backtrace::hcebb87ba8227fda0
  23:     0x5636832a5d89 - std::rt::lang_start::{{closure}}::h21da0b37e636b753
  24:     0x56368346616e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
  25:     0x56368346616e - std::panicking::try::do_call::h4044173225fe83dd
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  26:     0x56368346616e - std::panicking::try::hd8a722c09d156a53
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  27:     0x56368346616e - std::panic::catch_unwind::hd2ca07971cf0119b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  28:     0x56368346616e - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
  29:     0x56368346616e - std::panicking::try::do_call::hf47aa1aa005e5f1a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  30:     0x56368346616e - std::panicking::try::h73d246b2423eaf4e
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  31:     0x56368346616e - std::panic::catch_unwind::hbaaeae8f1b2f9915
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  32:     0x56368346616e - std::rt::lang_start_internal::h76f3e81e6b8f13f9
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
  33:     0x56368329dc25 - main
  34:     0x7f5f5c126d90 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  35:     0x7f5f5c126e40 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  36:     0x563683293915 - _start
  37:                0x0 - <unknown>

With old version it works.

cargo install resvg --version 0.15.0
./utils/assets_export.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
v0.7
  
To do
Development

No branches or pull requests

2 participants