alucryd / oxyromon

Rusty ROM OrgaNizer
Other
111 stars 13 forks source link

thread 'main' panicked at 'Error while finding game with id 122075', src/database.rs:787:25 #71

Closed anderbubble closed 1 year ago

anderbubble commented 1 year ago
Matches "Phantasy Star II - Amia's Adventure (Japan) (SegaNet).md"
⠁                                                                                                                                                                                                                                          thread 'main' panicked at 'Error while finding game with id 122075', src/database.rs:787:25
stack backtrace:
   0:     0x55eb7580d613 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he6993616c48c046d
   1:     0x55eb7583817c - core::fmt::write::h015f848e7775ab2c
   2:     0x55eb75807415 - std::io::Write::write_fmt::h8250842fca990ce5
   3:     0x55eb7580ef81 - std::panicking::default_hook::{{closure}}::h7810480484374dd6
   4:     0x55eb7580ec53 - std::panicking::default_hook::hfea8dba4e7fe6742
   5:     0x55eb7580f633 - std::panicking::rust_panic_with_hook::h8de7948a9082b958
   6:     0x55eb7580f527 - std::panicking::begin_panic_handler::{{closure}}::h3bab450da5856916
   7:     0x55eb7580dac4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2949d295702156bb
   8:     0x55eb7580f242 - rust_begin_unwind
   9:     0x55eb751a63e3 - core::panicking::panic_fmt::hbf4d9acd002fc8ef
  10:     0x55eb753203c9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h68588d602ca3d13f
  11:     0x55eb7538a087 - oxyromon::import_roms::import_rom::{{closure}}::h333014f8a5b8573f
  12:     0x55eb753def33 - oxyromon::main::main::{{closure}}::h42076659d089224f
  13:     0x55eb7533d4d8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hccad22515940a609
  14:     0x55eb751d92cf - std::thread::local::LocalKey<T>::with::hca2eda30aec02c1e
  15:     0x55eb7533a00f - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc6c75e992bde0421
  16:     0x55eb752c5b13 - async_io::driver::block_on::he697032cd7f359a7
  17:     0x55eb7540b376 - async_global_executor::executor::block_on::he1ee864a488807f6
  18:     0x55eb751d88ea - std::thread::local::LocalKey<T>::with::h3cfdcb9dad9eb78c
  19:     0x55eb75208fa1 - async_std::task::builder::Builder::blocking::he638a34e71109047
  20:     0x55eb7525cb3e - oxyromon::main::h7cda86c9f7e5cb59
  21:     0x55eb75245de6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc984df933d16ec04
  22:     0x55eb751d8625 - std::rt::lang_start::{{closure}}::he23a984833589a1f
  23:     0x55eb757ff762 - std::rt::lang_start_internal::hed0e237781f1c66f
  24:     0x55eb7525cb78 - main
  25:     0x7f2c7ce3deb0 - __libc_start_call_main
  26:     0x7f2c7ce3df60 - __libc_start_main@GLIBC_2.2.5
  27:     0x55eb751a6b35 - _start
  28:                0x0 - <unknown>
anderbubble commented 1 year ago

This is happening periodically while scanning my library for import. If I run again, it's able to proceed, and then fails on a later game.

Matches "Universal Soldier (USA) (Proto).sfc"
⠉                                                                                                                                                                                                                                          thread 'main' panicked at 'Error while finding game with id 109796', src/database.rs:787:25
stack backtrace:
   0:     0x559fd6932613 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he6993616c48c046d
   1:     0x559fd695d17c - core::fmt::write::h015f848e7775ab2c
   2:     0x559fd692c415 - std::io::Write::write_fmt::h8250842fca990ce5
   3:     0x559fd6933f81 - std::panicking::default_hook::{{closure}}::h7810480484374dd6
   4:     0x559fd6933c53 - std::panicking::default_hook::hfea8dba4e7fe6742
   5:     0x559fd6934633 - std::panicking::rust_panic_with_hook::h8de7948a9082b958
   6:     0x559fd6934527 - std::panicking::begin_panic_handler::{{closure}}::h3bab450da5856916
   7:     0x559fd6932ac4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2949d295702156bb
   8:     0x559fd6934242 - rust_begin_unwind
   9:     0x559fd62cb3e3 - core::panicking::panic_fmt::hbf4d9acd002fc8ef
  10:     0x559fd64453c9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h68588d602ca3d13f
  11:     0x559fd64af087 - oxyromon::import_roms::import_rom::{{closure}}::h333014f8a5b8573f
  12:     0x559fd6503f33 - oxyromon::main::main::{{closure}}::h42076659d089224f
  13:     0x559fd64624d8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hccad22515940a609
  14:     0x559fd62fe2cf - std::thread::local::LocalKey<T>::with::hca2eda30aec02c1e
  15:     0x559fd645f00f - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc6c75e992bde0421
  16:     0x559fd63eab13 - async_io::driver::block_on::he697032cd7f359a7
  17:     0x559fd6530376 - async_global_executor::executor::block_on::he1ee864a488807f6
  18:     0x559fd62fd8ea - std::thread::local::LocalKey<T>::with::h3cfdcb9dad9eb78c
  19:     0x559fd632dfa1 - async_std::task::builder::Builder::blocking::he638a34e71109047
  20:     0x559fd6381b3e - oxyromon::main::h7cda86c9f7e5cb59
  21:     0x559fd636ade6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc984df933d16ec04
  22:     0x559fd62fd625 - std::rt::lang_start::{{closure}}::he23a984833589a1f
  23:     0x559fd6924762 - std::rt::lang_start_internal::hed0e237781f1c66f
  24:     0x559fd6381b78 - main
  25:     0x7f4ad5701eb0 - __libc_start_call_main
  26:     0x7f4ad5701f60 - __libc_start_main@GLIBC_2.2.5
  27:     0x559fd62cbb35 - _start
  28:                0x0 - <unknown>
alucryd commented 1 year ago

Thanks for the report, probably a regression in the latest commits, will try to reproduce tomorrow.

alucryd commented 1 year ago

@anderbubble Had some time this evening after all. I wasn't able to reproduce, but I recall I had a similar issue when I initially developed import-roms. Under certain conditions the database would collapse on some queries, that mainly happened when I had duplicated queries in a transaction due to some unoptimized logic. With the latest changes (matching without a specified system), it was more than likely that oxyromon would retrieve the same game and same system twice in a transaction, I made it nice and clean again, at least for consoles. Arcade might still get the short end of the stick, optimizing that one will be more work, will tackle it if it arises.

Could you try my latest commit? https://github.com/alucryd/oxyromon/commit/25397bd547c1a7a3e7e97baf2c7039595f1231ed

Just imported upwards of 6000 games with no issue.

Also fixed a regression when matching games with a single quote in the name.

anderbubble commented 1 year ago

I'll definitely pull the latest commit; but I've got most of my library imported now, so I might not have as big a test case, at least without being artificial about it. But I'll let you know if / when I encounter further issues. Thanks!