alucryd / oxyromon

Rusty ROM OrgaNizer
Other
111 stars 13 forks source link

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/import_roms.rs:117:39 #72

Closed anderbubble closed 1 year ago

anderbubble commented 1 year ago
[roms@roms1 No-Intro]$ env RUST_BACKTRACE=full ~/oxyromon/target/release/oxyromon import-roms ./
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/import_roms.rs:117:39
stack backtrace:
   0:     0x558ab6a25613 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he6993616c48c046d
   1:     0x558ab6a5017c - core::fmt::write::h015f848e7775ab2c
   2:     0x558ab6a1f415 - std::io::Write::write_fmt::h8250842fca990ce5
   3:     0x558ab6a26f81 - std::panicking::default_hook::{{closure}}::h7810480484374dd6
   4:     0x558ab6a26c53 - std::panicking::default_hook::hfea8dba4e7fe6742
   5:     0x558ab6a27633 - std::panicking::rust_panic_with_hook::h8de7948a9082b958
   6:     0x558ab6a274e9 - std::panicking::begin_panic_handler::{{closure}}::h3bab450da5856916
   7:     0x558ab6a25ac4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2949d295702156bb
   8:     0x558ab6a27242 - rust_begin_unwind
   9:     0x558ab63be3e3 - core::panicking::panic_fmt::hbf4d9acd002fc8ef
  10:     0x558ab63be2ad - core::panicking::panic::hf8046a8a4311daf8
  11:     0x558ab65f961b - oxyromon::main::main::{{closure}}::h42076659d089224f
  12:     0x558ab65554d8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hccad22515940a609
  13:     0x558ab63f12cf - std::thread::local::LocalKey<T>::with::hca2eda30aec02c1e
  14:     0x558ab655200f - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc6c75e992bde0421
  15:     0x558ab64ddb13 - async_io::driver::block_on::he697032cd7f359a7
  16:     0x558ab6623376 - async_global_executor::executor::block_on::he1ee864a488807f6
  17:     0x558ab63f08ea - std::thread::local::LocalKey<T>::with::h3cfdcb9dad9eb78c
  18:     0x558ab6420fa1 - async_std::task::builder::Builder::blocking::he638a34e71109047
  19:     0x558ab6474b3e - oxyromon::main::h7cda86c9f7e5cb59
  20:     0x558ab645dde6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc984df933d16ec04
  21:     0x558ab63f0625 - std::rt::lang_start::{{closure}}::he23a984833589a1f
  22:     0x558ab6a17762 - std::rt::lang_start_internal::hed0e237781f1c66f
  23:     0x558ab6474b78 - main
  24:     0x7fbbb19f7eb0 - __libc_start_call_main
  25:     0x7fbbb19f7f60 - __libc_start_main@GLIBC_2.2.5
  26:     0x558ab63beb35 - _start
  27:                0x0 - <unknown>
anderbubble commented 1 year ago

Appears to happen when import path is relative.

alucryd commented 1 year ago

Actually it should only happen in that specific case, never tried importing the current directory, only by name inside the current directory for JB folders. Moved the offending println after the path has been canonicalized, the latest commit should do the trick.