bcicen / ctop

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

Panic index out of range after pressing "o" once or twice #297

Open kokizzu opened 2 years ago

kokizzu 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, 0xc000326090})
        /usr/lib/go/src/runtime/panic.go:838 +0x207
github.com/bcicen/ctop/cwidgets/single.(*Env).Set(0xc00011a1a0, {0xc00059e000?, 0x40d687?})
        /home/bradley/repos/bcicen/ctop/cwidgets/single/env.go:32 +0x2d5
github.com/bcicen/ctop/cwidgets/single.(*Single).SetMeta(0xc0005b20a0, 0xc0001161e0?)
        /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
zivkovic commented 2 years ago

Same here, occurred when I went to view resource statistics on container (right arrow key).

baskinsy commented 2 years ago

I confirm the same issue on Ubuntu 22.04.1 with docker 20.10.17.

hsequeda commented 1 year ago

The same, I get that error when I try to run the command.

TypicalShavonne commented 1 year ago

im getting the same issue when running the command 👍