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
[Bug]: atuin stats panics when faced with unusual string in history #1882
Labels
bug
Something isn't working
Comments
seconding this- here's another fun string this happens with. $ RUST_BACKTRACE=1 atuin stats
thread 'main' panicked at atuin/src/command/client/stats.rs:56:41:
begin <= end (1 <= 0) when slicing `|_| |____||___||_| |_| |___||_|_`
stack backtrace:
0: 0x1054a29d0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h61949099c17bb561
1: 0x1054ca8e0 - core::fmt::write::he0c0819610fe7c82
2: 0x105487c8c - std::io::Write::write_fmt::h14dadda6958822c3
3: 0x1054a2824 - std::sys_common::backtrace::print::h10166cbeffac9d38
4: 0x1054a3360 - std::panicking::default_hook::{{closure}}::hfec7fca779e11f3b
5: 0x1054a30e0 - std::panicking::default_hook::h26402d2c6670ffd0
6: 0x1054a39d4 - std::panicking::rust_panic_with_hook::hb00dd38969b5a277
7: 0x1054a378c - std::panicking::begin_panic_handler::{{closure}}::hc86edf66ba485638
8: 0x1054a2c04 - std::sys_common::backtrace::__rust_end_short_backtrace::h24f57ebe971b5eac
9: 0x1054a3514 - _rust_begin_unwind
10: 0x1055123e8 - core::panicking::panic_fmt::h21b3a72f47844886
11: 0x1054c6c10 - core::str::slice_error_fail_rt::h0bcfaeca513f69c4
12: 0x105512790 - core::str::slice_error_fail::h2e034b398f7b75a7
13: 0x104c3f69c - atuin::command::client::stats::compute_stats::h309a358b9b61ecd5
14: 0x104a24714 - atuin::command::client::Cmd::run_inner::{{closure}}::h4a9567b4490695de
15: 0x104b13448 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h351c1c892460edf6
16: 0x104c38318 - tokio::runtime::context::runtime::enter_runtime::hef50c501bad43a82
17: 0x104b6e14c - tokio::runtime::runtime::Runtime::block_on::h7d3459fe69753074
18: 0x104bd38a4 - atuin::command::client::Cmd::run::h588a5ab129b29fa6
19: 0x104c400a4 - atuin::command::AtuinCmd::run::hf663edac3a0da924
20: 0x104bd3d70 - atuin::main::h61cb3fcec8322f37
21: 0x104b96218 - std::sys_common::backtrace::__rust_begin_short_backtrace::he76aba5053fdcc16
22: 0x104c242b8 - std::rt::lang_start::{{closure}}::h024e6bed810fd961
23: 0x1054a3400 - std::panicking::try::ha883230fd73a158c
24: 0x105485fc0 - std::rt::lang_start_internal::ha86617696da0c619
25: 0x104bd8c0c - _main installed via nixpkgs/nix-darwin. atuin doctor output: atuin:
version: 18.1.0
sync:
cloud: false
records: false
auto_sync: true
last_sync: 2024-03-24 19:14:04.454307 +00:00:00
shell:
name: zsh
plugins:
- atuin
system:
os: Darwin
arch: arm64
version: '14.4'
disks:
- name: Macintosh HD
filesystem: apfs
- name: Macintosh HD
filesystem: apfs |
this helped me track down and a similar panic, with |
Got something very similar:
It would be helpful if it printed the entire command that caused the problem, so I could delete it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you expect to happen?
No panic! ;]
What happened?
When running
atuin stats
it panics with:Now that string
| awk '{print $1}' | R --no-echo -e 'x <- scan(file="stdin", quiet=TRUE); summary(x)'
is actually in my history like that (it's the "entire" command), so obviously some copy-pasta failure on my part, but I don't think it should makeatuin
panic (maybe due to starting with a|
?).Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: