bcicen/ctop

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

kokizzu opened this issue · 4 comments

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

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

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

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

im getting the same issue when running the command 👍