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

nushell sometimes panic #4751

Closed
Decodetalkers opened this issue Mar 6, 2022 · 8 comments
Closed

nushell sometimes panic #4751

Decodetalkers opened this issue Mar 6, 2022 · 8 comments
Labels
🐛 bug Something isn't working
Milestone

Comments

@Decodetalkers
Copy link
Contributor

Decodetalkers commented Mar 6, 2022

Describe the bug

https://asciinema.org/a/pgmei3pr33rzteFpSzCIHiTVd

When I tab after ./C it panic

How to reproduce

  1. Enter into the nushell folder and cargo run
  2. input "open ./C"
  3. then Tab
  4. It panic

My Environment is Archlinux,

Expected behavior

Not panic

Screenshots

https://asciinema.org/a/pgmei3pr33rzteFpSzCIHiTVd

Configuration

key value
version 0.59.1
branch main
short_commit 69fd777
commit_hash 69fd777
commit_date 2022-03-06 00:55:37 +00:00
build_os linux-x86_64
rust_version rustc 1.61.0-nightly (c274e4969 2022-03-05)
rust_channel nightly-x86_64-unknown-linux-gnu
cargo_version cargo 1.61.0-nightly (3d6970d 2022-02-28)
pkg_version 0.59.1
build_time 2022-03-06 12:37:11 +08:00
build_rust_channel debug
features default, which
installed_plugins

Additional context

No response

@fdncred fdncred added the 🐛 bug Something isn't working label Mar 6, 2022
@kubouch kubouch added the 0.60 label Mar 6, 2022
@kubouch
Copy link
Contributor

kubouch commented Mar 6, 2022

I could not reproduce it. However, when I type open ./C<tab>, the C will get deleted when the menu pops up.

@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Mar 6, 2022

I could not reproduce it. However, when I type open ./C<tab>, the C will get deleted when the menu pops up.

It seems it will happened in the fold of mine, In other fold it won't happened

Emmm, I change the path of the fold of nushell, but it still happened. I think something in the fold make it panic..

@Decodetalkers
Copy link
Contributor Author

After export RUST_BACKTRACE=1

/home/cht/git/nushell〉open ./Cthread 'main' panicked at 'attempt to subtract with overflow', /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:609:47
stack backtrace:
   0: rust_begin_unwind
             at /rustc/c274e4969f058b1c644243181ece9f829efa7594/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/c274e4969f058b1c644243181ece9f829efa7594/library/core/src/panicking.rs:143:14
   2: core::panicking::panic
             at /rustc/c274e4969f058b1c644243181ece9f829efa7594/library/core/src/panicking.rs:48:5
   3: reedline::engine::Reedline::handle_editor_event
             at /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:609:47
   4: reedline::engine::Reedline::handle_editor_event
             at /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:882:27
   5: reedline::engine::Reedline::handle_event
             at /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:469:13
   6: reedline::engine::Reedline::read_line_helper
             at /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:446:23
   7: reedline::engine::Reedline::read_line
             at /home/cht/.cargo/git/checkouts/reedline-e42026a78d91c510/7c5f20d/src/engine.rs:348:22
   8: nu::repl::evaluate
             at ./src/repl.rs:242:21
   9: nu::main
             at ./src/main.rs:215:31
  10: core::ops::function::FnOnce::call_once
             at /rustc/c274e4969f058b1c644243181ece9f829efa7594/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Mar 6, 2022

I remove the crates fold, It not panic again. I just do

mv crates brates

It stops panic.
Maybe the crates fold make it overflow

Yes, Just because there is a file or fold begined with c it panic

@Decodetalkers
Copy link
Contributor Author

@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Mar 6, 2022

https://asciinema.org/a/jC9CfXWBxlWDqvqk0tZiaCYld
I fond it will happen when meet uppercase and lowercase at the same time. Any char is ok.

@sophiajt
Copy link
Contributor

sophiajt commented Mar 8, 2022

I can reproduce this with the steps above. Thanks!

To reproduce on macOS, open up the latest main in the nushell source directory and do the same steps: open ./C<tab>

@sophiajt
Copy link
Contributor

sophiajt commented Mar 9, 2022

fixed by #4779

@sophiajt sophiajt closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants