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

attempt to subtract with overflow in console_viewer.rs #649

Open
freedge opened this issue Jan 4, 2024 · 0 comments
Open

attempt to subtract with overflow in console_viewer.rs #649

freedge opened this issue Jan 4, 2024 · 0 comments

Comments

@freedge
Copy link

freedge commented Jan 4, 2024

noticed when resizing the terminal (either with tmux or with resizing my terminal window), py-spy crashes with

thread 'main' panicked at src/console_viewer.rs:261:52:
attempt to subtract with overflow
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: py_spy::console_viewer::ConsoleViewer::display
             at ./py-spy/src/console_viewer.rs:261:52
   4: py_spy::console_viewer::ConsoleViewer::increment_common
             at ./py-spy/src/console_viewer.rs:357:13
   5: py_spy::console_viewer::ConsoleViewer::increment
             at ./py-spy/src/console_viewer.rs:128:9
   6: py_spy::sample_console
             at ./py-spy/src/main.rs:80:9
   7: py_spy::run_spy_command
             at ./py-spy/src/main.rs:381:13
   8: py_spy::pyspy_main
             at ./py-spy/src/main.rs:413:9
   9: py_spy::main
             at ./py-spy/src/main.rs:488:23
  10: core::ops::function::FnOnce::call_once
             at /builddir/build/BUILD/rustc-1.73.0-src/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

when there are not enough lines for py-spy to draw itself

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

1 participant