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]: panic in src/canvas/widgets/disk_table.rs:66:31 #773

Closed
1 task done
popey opened this issue Jul 27, 2022 · 2 comments · Fixed by #749
Closed
1 task done

[Bug]: panic in src/canvas/widgets/disk_table.rs:66:31 #773

popey opened this issue Jul 27, 2022 · 2 comments · Fixed by #749
Labels
bug Something isn't working the way that is expected.

Comments

@popey
Copy link

popey commented Jul 27, 2022

Checklist

Describe the issue

btm crashed when the number of disks changed.

I had btm running in a terminal, and did a snap remove $foo $bar $baz elsewhere which results in some of the /snap/foo mount points disappearing. I suspect btm didn't like this.

thread '<unnamed>' panicked at 'range start index 17 out of range for slice of length 16', src/canvas/widgets/disk_table.rs:66:31

What operating system are you using?

Linux

What architecture are you using?

x86_64 / AMD64

What terminal(s) are you running bottom on?

Konsole Version 22.04.3
With byobu 5.133-1 running inside it.
Resulting in it running in tmux 3.2a-4build1.

What version of bottom are you running?

0.6.8

How did you install bottom?

Official deb from releases page

How can we reproduce this?

  1. snap install firefox ncspot openspades
  2. btm
  3. snap remove firefox ncspot openspades

Additional information

Here's the output when it dies.

thread '<unnamed>' panicked at 'range start index 17 out of range for slice of length 16', src/canvas/widgets/disk_table.rs:66:31
   0: bottom::panic_hook
   1: std::panicking::rust_panic_with_hook
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18
   4: rust_begin_unwind
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
   5: core::panicking::panic_fmt
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
   6: core::slice::index::slice_start_index_len_fail
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/slice/index.rs:34:5
   7: <bottom::canvas::Painter as bottom::canvas::widgets::disk_table::DiskTableWidget>::draw_disk_table
   8: bottom::canvas::Painter::draw_widgets_with_constraints
   9: bottom::canvas::Painter::draw_data::{{closure}}
  10: bottom::try_drawing
  11: btm::main
  12: std::sys_common::backtrace::__rust_begin_short_backtrace
  13: main
  14: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  15: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:392:3
  16: _start
@popey popey added the bug Something isn't working the way that is expected. label Jul 27, 2022
@ClementTsang
Copy link
Owner

I think(?) this is already fixed in the main branch, I'll test later.

@ClementTsang
Copy link
Owner

Ah, remembered wrong - it's fixed in one of my in-progress PRs (#749). Will close this when that is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working the way that is expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants