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

[Bug]: thread 'main' panicked at stats.rs:196:14: window size must be non-zero #2470

Open
will opened this issue Dec 5, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@will
Copy link

will commented Dec 5, 2024

What did you expect to happen?

A nice error message instead of a rust panic when running atuin stats year -n0

What happened?

❯ RUST_BACKTRACE=1 atuin stats year -n0
thread 'main' panicked at crates/atuin-history/src/stats.rs:196:14:
window size must be non-zero
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: atuin_history::stats::compute
   4: atuin::command::client::Cmd::run_inner::{{closure}}
   5: tokio::runtime::scheduler::current_thread::Context::enter
   6: tokio::runtime::context::scoped::Scoped<T>::set
   7: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
   8: tokio::runtime::context::runtime::enter_runtime
   9: tokio::runtime::runtime::Runtime::block_on
  10: atuin::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Atuin doctor output

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "fish",
    "default": "fish",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Darwin",
    "arch": "arm64",
    "version": "15.1.1",
    "disks": [
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      },
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      }
    ]
  }
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@will will added the bug Something isn't working label Dec 5, 2024
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

1 participant