rabite0 / hunter

The fastest file manager in the galaxy!
Do What The F*ck You Want To Public License
1.31k stars 64 forks source link

Quitting from log results in panic #26

Closed therealklanni closed 5 years ago

therealklanni commented 5 years ago

Reproduce: While in hunter in any state, even just after starting the program:

  1. press l for log view
  2. press q to quit

Expected: hunter should quit cleanly

Actual: hunter panics, ^C required to exit

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
stack backtrace:
   0:        0x10067a7f3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h42ef8f910989f2a5
   1:        0x100676792 - std::sys_common::backtrace::_print::h57563d504eb2a535
   2:        0x100679716 - std::panicking::default_hook::{{closure}}::hd122b1df844d64a4
   3:        0x1006794bf - std::panicking::default_hook::h95cc52151fdfa338
   4:        0x100533d60 - hunter::die_gracefully::{{closure}}::h4943948830babf57
   5:        0x100679f70 - std::panicking::rust_panic_with_hook::h14fcc8bcee6073e2
   6:        0x1006799bc - std::panicking::continue_panic_fmt::ha9475004e44b6b49
   7:        0x1006798a8 - rust_begin_unwind
   8:        0x1006917c1 - core::panicking::panic_fmt::h6b286a6a4688064c
   9:        0x1004d1e92 - core::result::unwrap_failed::h4a6b49db654acb5f
  10:        0x1004e6715 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3b996df650fb3134
  11:        0x1004e81e1 - std::panicking::try::do_call::haf5b9d3e62f44c81
  12:        0x1006820ae - __rust_maybe_catch_panic
  13:        0x1004ff1a1 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h8de97fa96955d774
  14:        0x10066c2cd - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h981e060567c31168
  15:        0x10068175d - std::sys::unix::thread::Thread::new::thread_start::h565ff451d36149b1
  16:     0x7fff666c32ea - _pthread_body
  17:     0x7fff666c6248 - _pthread_start
^C

Note that ^C in the above output is not an interrupt of the output, the full backtrace is shown.


macOS 10.14.4 (18E226) rustc 1.36.0-nightly (3991285f5 2019-04-25)

rabite0 commented 5 years ago

Huh, that didn't use to happen. The same happens in the subprocess viewer. Typing q in the minibuffer also exits it. It should only quit when in the main view.

Thanks, I will look into this, should be easy to fix.

rabite0 commented 5 years ago

Wow, this goes way back, this bug, or rather both (crash on quit in log/process viewer, and the "q" thing in minibuffer) has been in there for months and I never noticed.

I pushed a fix for this, it shouldn't crash any more. Quitting only works in the main file browser view now. That's how it used to work at some point, anyway. The quitting with the shell auto-cd thing also only works in that view...

Anyway thanks for reporting. The fact that something like this has been in there for months is a bit embarassing :).