Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread panic when not loaded from i3 #43

Open
farisachugthai opened this issue Nov 20, 2018 · 6 comments
Open

Thread panic when not loaded from i3 #43

farisachugthai opened this issue Nov 20, 2018 · 6 comments

Comments

@farisachugthai
Copy link

I'll admit that this is a corner case and one that I doubt you'll frequently run into; however, I wanted to mention it regardless.

I switch back and forth between Plasma 5 and i3. I booted into Plasma today and while surfing crates.io, I noticed this package. Installed it and upon running it with a few different flags, I kept getting errors.I decided to run the command almost directly from the readme. Here's the output::

$ i3-style gruvbox --output ~/.config/i3/config --reload
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:1009:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:477
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:391
   6: rust_begin_unwind
             at libstd/panicking.rs:326
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:77
   8: core::result::unwrap_failed
   9: i3_style::validate_config
  10: i3_style::main
  11: std::rt::lang_start::{{closure}}
  12: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  13: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:103
  14: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  15: main
  16: __libc_start_main
  17: _start
@farisachugthai
Copy link
Author

Restarted the computer and booted into i3 and am experiencing the same issue.

@acrisci
Copy link
Member

acrisci commented Nov 20, 2018

Sorry my rust is bad. It's supposed to print a nice error message instead of panic.

Thr panic comes from i3-msg not being found in the path when trying to reload. If you run under wayland, it tries to use swaymsg. Look at the end of main.rs for the reload logic.

@acrisci
Copy link
Member

acrisci commented Nov 20, 2018

Ah ok looking at this again, it's in the config validation step which requires i3 to be in the PATH. Maybe the way I'm trying to find the command in the PATH is wrong. I'll take a look at it.

@farisachugthai
Copy link
Author

Hahah no worries. I dont know rust at all, I honestly just thought it was a neat idea and wanted to share my traceback with you. Sorry I cant be of more help but if you have any questions, id be happy to answer anything that you think would help!

@acrisci
Copy link
Member

acrisci commented Nov 21, 2018

I just pushed some changes to master that improves the error message. Can you test it and see if the panic is still there?

@sganon
Copy link

sganon commented Jan 8, 2019

I've experienced the same issues with a fresh install of i3 and cargo/rust. I had to use older version available on npm which work still just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants