Figma-Linux / figma-linux-font-helper

Font Helper for Figma for Linux x64 platform
GNU General Public License v2.0
409 stars 34 forks source link

FontHelper fails to start with local fonts #9

Open abienz opened 4 years ago

abienz commented 4 years ago

Firstly, FontHelper is working with system fonts and the default config.

When I add my local user fonts: /home/USERNAME/.local/share/fonts I get and error with the service and it fails to load, here is the output from the stacktrace.

thread '<unnamed>' panicked at 'BUG: Cannot get family_name', src/libcore/option.rs:1187:5
stack backtrace:
   0:     0x5600cd1b1d94 - backtrace::backtrace::libunwind::trace::h9218987ade90cd0d
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5600cd1b1d94 - backtrace::backtrace::trace_unsynchronized::hd0d9c7dd4c0d5b20
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5600cd1b1d94 - std::sys_common::backtrace::_print_fmt::h9d655e018f90c6f9
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x5600cd1b1d94 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1342c7e899db7cad
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5600cd1d312c - core::fmt::write::h8ec71c84cda34acb
                               at src/libcore/fmt/mod.rs:1030
   5:     0x5600cd1ad897 - std::io::Write::write_fmt::hf7cbec8fa40db95a
                               at src/libstd/io/mod.rs:1412
   6:     0x5600cd1b3f3e - std::sys_common::backtrace::_print::h738c81758a9d8612
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x5600cd1b3f3e - std::sys_common::backtrace::print::hc1fdee4f9b3bd05b
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x5600cd1b3f3e - std::panicking::default_hook::{{closure}}::hed09d3d3b53e7225
                               at src/libstd/panicking.rs:188
   9:     0x5600cd1b3c31 - std::panicking::default_hook::hddeb152065620354
                               at src/libstd/panicking.rs:205
  10:     0x5600cd1b463b - std::panicking::rust_panic_with_hook::h958da3c6025ed986
                               at src/libstd/panicking.rs:464
  11:     0x5600cd1b41de - std::panicking::continue_panic_fmt::hca02fa9fd96944e7
                               at src/libstd/panicking.rs:373
  12:     0x5600cd1b40c6 - rust_begin_unwind
                               at src/libstd/panicking.rs:302
  13:     0x5600cd1cfdee - core::panicking::panic_fmt::hd050d2eb022dfa28
                               at src/libcore/panicking.rs:141
  14:     0x5600cd1cfe57 - core::option::expect_failed::ha2ccd8fb6c8a6167
                               at src/libcore/option.rs:1187
  15:     0x5600cd0f14aa - libfonthelper::make_fonts::hf6d99d3c3f4e5d7d
  16:     0x5600cd0f0b10 - <libfonthelper::Fonts as core::iter::traits::iterator::Iterator>::next::h7aac3bcbcf4ceda6
  17:     0x5600cd0f01f4 - libfonthelper::Fonts::to_json::h73dba66cfad485ed
  18:     0x5600cd0c24c5 - font_helper::routes::get_files::handler::ha753778c36f587a8
  19:     0x5600cd0c1788 - core::ops::function::Fn::call::h04b03cb829e88ea8
  20:     0x5600cd0c11a9 - font_helper::server::Server::start::{{closure}}::hd7595629601cacad
  21:     0x5600cd0cbd81 - <F as scoped_threadpool::FnBox>::call_box::ha10e99a5ac7623f6
  22:     0x5600cd0da688 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4e211e877966d40d
  23:     0x5600cd0db23c - std::panicking::try::do_call::hb5b24a88d581fa65
  24:     0x5600cd1b8e3a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:79
  25:     0x5600cd0dab70 - core::ops::function::FnOnce::call_once{{vtable.shim}}::he36b3df87e263b90
  26:     0x5600cd1a6ccf - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h85ae0e93cb1a7be4
                               at /rustc/3fc30d884ae0c988d98452a06737705cfe34806a/src/liballoc/boxed.rs:942
  27:     0x5600cd1b8010 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h6c11824f8881753b
                               at /rustc/3fc30d884ae0c988d98452a06737705cfe34806a/src/liballoc/boxed.rs:942
  28:     0x5600cd1b8010 - std::sys_common::thread::start_thread::h77419fab109b7722
                               at src/libstd/sys_common/thread.rs:13
  29:     0x5600cd1b8010 - std::sys::unix::thread::Thread::new::thread_start::had8a277fedeb5612
                               at src/libstd/sys/unix/thread.rs:79
  30:     0x7f0dc6a8146f - start_thread
  31:     0x7f0dc69973d3 - clone
  32:                0x0 - <unknown>
thread 'main' panicked at 'Thread pool worker panicked', /home/ruut/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped_threadpool-0.1.9/src/lib.rs:236:13
stack backtrace:
   0:     0x5600cd1b1d94 - backtrace::backtrace::libunwind::trace::h9218987ade90cd0d
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5600cd1b1d94 - backtrace::backtrace::trace_unsynchronized::hd0d9c7dd4c0d5b20
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5600cd1b1d94 - std::sys_common::backtrace::_print_fmt::h9d655e018f90c6f9
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x5600cd1b1d94 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1342c7e899db7cad
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5600cd1d312c - core::fmt::write::h8ec71c84cda34acb
                               at src/libcore/fmt/mod.rs:1030
   5:     0x5600cd1ad897 - std::io::Write::write_fmt::hf7cbec8fa40db95a
                               at src/libstd/io/mod.rs:1412
   6:     0x5600cd1b3f3e - std::sys_common::backtrace::_print::h738c81758a9d8612
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x5600cd1b3f3e - std::sys_common::backtrace::print::hc1fdee4f9b3bd05b
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x5600cd1b3f3e - std::panicking::default_hook::{{closure}}::hed09d3d3b53e7225
                               at src/libstd/panicking.rs:188
   9:     0x5600cd1b3c31 - std::panicking::default_hook::hddeb152065620354
                               at src/libstd/panicking.rs:205
  10:     0x5600cd1b463b - std::panicking::rust_panic_with_hook::h958da3c6025ed986
                               at src/libstd/panicking.rs:464
  11:     0x5600cd0db215 - std::panicking::begin_panic::hecfe70e2c52ef36d
  12:     0x5600cd0da5f2 - scoped_threadpool::Scope::join_all::hcce507694dbd531f
  13:     0x5600cd0d2158 - scoped_threadpool::Pool::scoped::ha0a68c2a92f93599
  14:     0x5600cd0ce2d1 - simple_server::Server::listen_on_socket::h401d1291e90256f0
  15:     0x5600cd0ce0d7 - simple_server::Server::listen::heee2b240ae5291da
  16:     0x5600cd0c5abc - font_helper::server::Server::start::he19576629dc692f2
  17:     0x5600cd0c1633 - font_helper::main::h13f0b1d1ec3f1be9
  18:     0x5600cd0c4353 - std::rt::lang_start::{{closure}}::h52fbd055eaeb514c
  19:     0x5600cd1b4063 - std::rt::lang_start_internal::{{closure}}::hf385176dea922fb4
                               at src/libstd/rt.rs:48
  20:     0x5600cd1b4063 - std::panicking::try::do_call::hb99c9de5bcd245ec
                               at src/libstd/panicking.rs:287
  21:     0x5600cd1b8e3a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:79
  22:     0x5600cd1b4b1d - std::panicking::try::h2bef7e6133a9e58a
                               at src/libstd/panicking.rs:265
  23:     0x5600cd1b4b1d - std::panic::catch_unwind::hcc108bf73e46542c
                               at src/libstd/panic.rs:396
  24:     0x5600cd1b4b1d - std::rt::lang_start_internal::h6bfe5befc66f0ebf
                               at src/libstd/rt.rs:47
  25:     0x5600cd0c16d2 - main
  26:     0x7f0dc68bf023 - __libc_start_main
  27:     0x5600cd0b918a - _start
  28:                0x0 - <unknown>

Also is the path correct in this line? thread 'main' panicked at 'Thread pool worker panicked', /home/ruut/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped_threadpool-0.1.9/src/lib.rs:236:13