bcicen / ctop

Top-like interface for container metrics
https://ctop.sh
MIT License
15.6k stars 528 forks source link

0.7.7 crash when navigating to the right in the first line #294

Closed DocBrown101 closed 2 years ago

DocBrown101 commented 2 years ago

panic: runtime error: index out of range [1] with length 0 [recovered] panic: runtime error: index out of range [1] with length 0

goroutine 1 [running]: main.panicExit() /home/bradley/repos/bcicen/ctop/main.go:137 +0x4d panic({0xa9f2e0, 0xc0002b6420}) /usr/lib/go/src/runtime/panic.go:838 +0x207 github.com/bcicen/ctop/cwidgets/single.(Env).Set(0xc000292c20, {0xc0002e80a0?, 0x40d687?}) /home/bradley/repos/bcicen/ctop/cwidgets/single/env.go:32 +0x2d5 github.com/bcicen/ctop/cwidgets/single.(Single).SetMeta(0xc00007e140, 0xc0002020f0?) /home/bradley/repos/bcicen/ctop/cwidgets/single/main.go:58 +0xc5 github.com/bcicen/ctop/container.(*Container).SetUpdater(...) /home/bradley/repos/bcicen/ctop/container/main.go:57 main.SingleView() /home/bradley/repos/bcicen/ctop/grid.go:87 +0x17a main.Display() /home/bradley/repos/bcicen/ctop/grid.go:249 +0x7ee main.main() /home/bradley/repos/bcicen/ctop/main.go:111 +0x5e5

bcicen commented 2 years ago

fix pushed in https://github.com/bcicen/ctop/commit/acbf17a4fd8bb08ef26cd8294c5dbeee1f548c8e ; thanks for reporting!