nicohman / wyvern

A simple CLI client for installing and maintaining linux GOG games
GNU General Public License v3.0
87 stars 5 forks source link

Crash when using ls and update #15

Closed MikeMaximus closed 5 years ago

MikeMaximus commented 5 years ago

I just wanted to report some crashes I'm getting when I tried wyvern.

I get the following anytime I run the "ls" command, and when attempting to update certain games, such as Tower of Time. The backtrace is identical in both cases.


name = 'wyvern'
operating_system = 'unix:Ubuntu'
crate_version = '1.3.1'
explanation = '''
Panic occurred in file 'src/libcore/result.rs' at line 997
'''
method = 'Panic'
backtrace = '''
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized::h1329a2593493e9a4 (0x5596ba11b856)
   1: backtrace::capture::Backtrace::create::h16101f07b59a61ea (0x5596ba11ac77)
   2: backtrace::capture::Backtrace::new::h71f40c1b075807a9 (0x5596ba11ab9d)
   3: human_panic::report::Report::new::h7ca9937bcaa66099 (0x5596ba074742)
   4: human_panic::handle_dump::h7be66dc999882f6f (0x5596ba073e17)
   5: wyvern::main::{{closure}}::h24d4f5a3c90a0f57 (0x5596b9d71798)
   6: std::panicking::rust_panic_with_hook::h744417edfe714d72 (0x5596ba19c3e9)
             at src/libstd/panicking.rs:482
   7: std::panicking::continue_panic_fmt::h3557b3c3fa21b47b (0x5596ba19be91)
             at src/libstd/panicking.rs:385
   8: rust_begin_unwind (0x5596ba19bd75)
             at src/libstd/panicking.rs:312
   9: core::panicking::panic_fmt::h74ee8034b317ceed (0x5596ba1b99fc)
             at src/libcore/panicking.rs:85
  10: core::result::unwrap_failed::hd485e30a906e635d (0x5596b9da0dc9)
  11: wyvern::parse_args::hc891995a89059041 (0x5596b9d6edd1)
  12: wyvern::main::hb228d5a73bc9c62c (0x5596b9d6ac1e)
  13: std::rt::lang_start::{{closure}}::h8560fca4078eb982 (0x5596b9d7321f)
  14: std::rt::lang_start_internal::{{closure}}::h8ad4264c6b68797c (0x5596ba19bd12)
             at src/libstd/rt.rs:49
      std::panicking::try::do_call::h7a0381557c6c2cee
             at src/libstd/panicking.rs:297
  15: __rust_maybe_catch_panic (0x5596ba1a5729)
             at src/libpanic_unwind/lib.rs:92
  16: std::panicking::try::h72cb0fef6e9c0ab1 (0x5596ba19c925)
             at src/libstd/panicking.rs:276
      std::panic::catch_unwind::hbff071ae76e6f224
             at src/libstd/panic.rs:388
      std::rt::lang_start_internal::he0d8d06abc6f912f
             at src/libstd/rt.rs:48
  17: main (0x5596b9d71811)
  18: __libc_start_main (0x7fc164107b96)
  19: _start (0x5596b9d22839)
  20: <unknown> (0x0)'''
nicohman commented 5 years ago

Could you try running again, using wyvern -vvvv ls for some possibly helpful extra logs? Sorry for the inconvenience.

MikeMaximus commented 5 years ago

I tried that before so I could get more detailed information about where it was failing, but unfortunately it doesn't give me any extra terminal output and the report file looks the same.

nicohman commented 5 years ago

That’s weird. Would you mind cloning wyvern, building it using ‘cargo build’, and seeing what the debug binary gives as a backtrace? If it’s failing with the same backtrace for both ‘ls’ and ‘update’, it might be something wrong with fetching game info.

MikeMaximus commented 5 years ago

I'm just heading out for the weekend but I'll give it a try next week.

MikeMaximus commented 5 years ago

I had some time this morning so I built it on my laptop. This is the debug output.

mike@ubuntu-vbox:~/wyvern/target/debug$ RUST_BACKTRACE=1 ./wyvern ls
thread 'main' panicked at 'Couldn't fetch games: Error(Parse(Error("invalid type: null, expected i64", line: 1, column: 22692)), State { next_error: None, backtrace: InternalBacktrace { backtrace: Some(stack backtrace:
   0: error_chain::backtrace::imp::InternalBacktrace::new::hc2da2e50174079db (0x55fcf9188e92)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/error-chain-0.12.0/src/backtrace.rs:56
   1: <error_chain::State as core::default::Default>::default::hbf636977732b3240 (0x55fcf9187572)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/error-chain-0.12.0/src/lib.rs:666
   2: gog::error::Error::from_kind::h62df2e1eb4b63c97 (0x55fcf8b839e1)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/gog-0.3.3/<::error_chain::error_chain::impl_error_chain_processed macros>:53
   3: <gog::error::Error as core::convert::From<serde_json::error::Error>>::from::h7941c6bfb48e8aa7 (0x55fcf8b83b6e)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/gog-0.3.3/<::error_chain::error_chain::impl_error_chain_processed macros>:103
   4: gog::Gog::freq::h59a604f7b850c428 (0x55fcf8be6f75)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/gog-0.3.3/src/lib.rs:185
   5: gog::Gog::fget::h2073391f90a402c5 (0x55fcf8be5518)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/gog-0.3.3/src/lib.rs:164
   6: gog::Gog::get_all_filtered_products::h8e9866ab64cc6a22 (0x55fcf8bed82e)
             at /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/gog-0.3.3/src/lib.rs:481
   7: wyvern::parse_args::h085c4b7983912368 (0x55fcf8910149)
             at src/main.rs:104
   8: wyvern::main::h8871391d6614d89a (0x55fcf890f103)
             at src/main.rs:89
   9: std::rt::lang_start::{{closure}}::h07c6b02a319e67b8 (0x55fcf89dd4e1)
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  10: std::rt::lang_start_internal::{{closure}}::h8ad4264c6b68797c (0x55fcf970c4b2)
             at src/libstd/rt.rs:49
      std::panicking::try::do_call::h7a0381557c6c2cee
             at src/libstd/panicking.rs:297
  11: __rust_maybe_catch_panic (0x55fcf9715ec9)
             at src/libpanic_unwind/lib.rs:92
  12: std::panicking::try::h72cb0fef6e9c0ab1 (0x55fcf970d0c5)
             at src/libstd/panicking.rs:276
      std::panic::catch_unwind::hbff071ae76e6f224
             at src/libstd/panic.rs:388
      std::rt::lang_start_internal::he0d8d06abc6f912f
             at src/libstd/rt.rs:48
  13: std::rt::lang_start::h260817735454635e (0x55fcf89dd4a8)
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  14: main (0x55fcf8917c99)
  15: __libc_start_main (0x7f82be520b96)
  16: _start (0x55fcf88db009)
  17: <unknown> (0x0)) } })', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/macros.rs:16
   9: <core::result::Result<T, E>>::expect
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/result.rs:825
  10: wyvern::parse_args
             at src/main.rs:104
  11: wyvern::main
             at src/main.rs:89
  12: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  13: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  15: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  16: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  17: main
  18: __libc_start_main
  19: _start
nicohman commented 5 years ago

Okay, it looks like the issue here is something to do with your account/specific games within it. I checked tower of time, and it appears to work fine, though I can't see the kind of details that can be seen when you own the game. My best guess is that updates isn't actually a required property like I thought. Could you try editing Cargo.toml and replacing the gog = "0.3.3" line with: gog = { git = "https://github.com/nicohman/gog-rs, branch = "update_fix" } Then try building it again and seeing if that fixes it?

MikeMaximus commented 5 years ago

I think that fixed it. 👍

I ran ls and it listed all my games. I don't have access to my installed games at the moment, but I downloaded and installed a small game (Cultist Simulator) and ran an update on it. That worked fine as well.

nicohman commented 5 years ago

Great! That'll be merged into the GOG crate's master and wyvern will hopefully be updated to a new major version with this update within a few days once the new login method is finished. I'll close this issue now as it's been resolved. Thanks for the report and your assistance in figuring this out!