googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
239 stars 19 forks source link

resvg failing at "the previous segment must be M/L/C" #470

Open caseyahenson opened 2 months ago

caseyahenson commented 2 months ago

Has anybody experienced this error? It appears to be a known and corrected issue in some distributions of resvg but apparently not the resvg-cli package used here. For example a correction was made in resvg-js for the exact error: https://github.com/yisibl/resvg-js/pull/204.

It's happening only on certain SVGs but I cannot find a pattern.

Full output below: thread 'main' panicked at 'the previous segment must be M/L/C', usvg/src/pathdata.rs:160:17 stack backtrace: 0: 0x5591ebb22dfc - std::backtrace_rs::backtrace::libunwind::trace::h91c465e73bf6c785 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x5591ebb22dfc - std::backtrace_rs::backtrace::trace_unsynchronized::hae9da36f5d58b5f3 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x5591ebb22dfc - std::sys_common::backtrace::_print_fmt::h7f499fa126a7effb at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:67:5 3: 0x5591ebb22dfc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e2b509ce2ce6007 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:46:22 4: 0x5591ebb4690c - core::fmt::write::h753c7571fa063ecb at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/fmt/mod.rs:1168:17 5: 0x5591ebb1eb13 - std::io::Write::write_fmt::h2815c0519c99ba09 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/io/mod.rs:1660:15 6: 0x5591ebb25392 - std::sys_common::backtrace::_print::h64941a6fc8b0ed9b at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:49:5 7: 0x5591ebb25392 - std::sys_common::backtrace::print::hcf25e43e1a9b0766 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:36:9 8: 0x5591ebb25392 - std::panicking::default_hook::{{closure}}::h78d3e6cf97fc623d at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:211:50 9: 0x5591ebb24f75 - std::panicking::default_hook::hda898f8d3ad1a5ae at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:228:9 10: 0x5591ebb259e3 - std::panicking::rust_panic_with_hook::h1a5ea2d6c23051aa at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:606:17 11: 0x5591eba509e5 - std::panicking::begin_panic::{{closure}}::h69ca6e6ed8ffe374 12: 0x5591eba509b4 - std::sys_common::backtrace::__rust_end_short_backtrace::h91b0db89e548bdc0 13: 0x5591eb98111c - std::panicking::begin_panic::hddeabca5febff144 14: 0x5591eba67242 - usvg::pathdata::PathData::push_quad_to::h7bc760c5bc90f294 15: 0x5591eba6be9a - usvg::svgtree::parse::parse_path::hbddbe0c946b86e2c 16: 0x5591eba6aa19 - usvg::svgtree::parse::parse_svg_attribute::h118e299ffd542e56 17: 0x5591eba6ce5a - usvg::svgtree::parse::<impl usvg::svgtree::Document>::append_attribute::hf2e8a8e918471492 18: 0x5591eba69dd3 - usvg::svgtree::parse::append_attribute::h7199f78ec8c5d47c 19: 0x5591eba69c05 - usvg::svgtree::parse::parse_svg_element::h18ffe06dc358f3ea 20: 0x5591eba68503 - usvg::svgtree::parse::parse_xml_node::h21a4b66361c7e7f4 21: 0x5591eba6832e - usvg::svgtree::parse::parse_xml_node_children::hb30339fd9d5e974a 22: 0x5591eba687a8 - usvg::svgtree::parse::parse_xml_node::h21a4b66361c7e7f4 23: 0x5591eba6832e - usvg::svgtree::parse::parse_xml_node_children::hb30339fd9d5e974a 24: 0x5591eba675ee - usvg::svgtree::parse::parse::hcba4cda95a370320 25: 0x5591eba61e0c - usvg::Tree::from_str::h0d8b6fd7a4d53b5b 26: 0x5591eba61ac5 - usvg::Tree::from_data::h06ec074a8ddcb1df 27: 0x5591eb987d01 - resvg::main::hf9289236e4ba87e0 28: 0x5591eb991e23 - std::sys_common::backtrace::__rust_begin_short_backtrace::h06b1dd1c5f8c8f3f 29: 0x5591eb994159 - std::rt::lang_start::{{closure}}::hc88a9e8d993d4983 30: 0x5591ebb224b0 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h443f738a8e9f947a at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:259:13 31: 0x5591ebb224b0 - std::panicking::try::do_call::h1e21ba261ba489ec at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40 32: 0x5591ebb224b0 - std::panicking::try::h6afd48af8b6c96ac at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19 33: 0x5591ebb224b0 - std::panic::catch_unwind::h85dd95e0bab7fb60 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14 34: 0x5591ebb224b0 - std::rt::lang_start_internal::{{closure}}::h038455e697c8b03e at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:48 35: 0x5591ebb224b0 - std::panicking::try::do_call::h6b0ad65979f3077a at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40 36: 0x5591ebb224b0 - std::panicking::try::h010108d314169ac6 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19 37: 0x5591ebb224b0 - std::panic::catch_unwind::hff397f912b1535c2 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14 38: 0x5591ebb224b0 - std::rt::lang_start_internal::h52e73755f77c7dd9 at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:20 39: 0x5591eb98ed52 - main 40: 0x7f9e57074d90 - <unknown> 41: 0x7f9e57074e40 - __libc_start_main 42: 0x5591eb986a40 - <unknown> 43: 0x0 - <unknown>