dive
dive copied to clipboard
[ERROR] index out of range when reaching end of layers list
Hello, I would like to say that this tool is very useful, thanks a lot ! This error can be reproduced in a image containing lots of layers (15 layers in my case). In the layer section, reach the last layer and continue pressing down, you will get this error:
panic: runtime error: index out of range [15] with length 15
goroutine 19 [running]: github.com/wagoodman/dive/runtime/ui/view.(*Layer).CurrentLayer(...) /Users/wagoodman/code/dive/runtime/ui/view/layer.go:235 github.com/wagoodman/dive/runtime/ui/view.(*Layer).notifyLayerChangeListeners(0xc004b7a000, 0x0, 0xf) /Users/wagoodman/code/dive/runtime/ui/view/layer.go:62 +0x20d github.com/wagoodman/dive/runtime/ui/view.(*Layer).SetCursor(0xc004b7a000, 0xf, 0x1, 0x0) /Users/wagoodman/code/dive/runtime/ui/view/layer.go:225 +0x37 github.com/wagoodman/dive/runtime/ui/view.(*Layer).CursorDown(0xc004b7a000, 0xc0008f98e8, 0x43d95c) /Users/wagoodman/code/dive/runtime/ui/view/layer.go:205 +0x8a github.com/wagoodman/dive/runtime/ui/key.(*Binding).onAction(0xc005046bc0, 0xc004b74000, 0xc0050820f0, 0x0, 0x28) /Users/wagoodman/code/dive/runtime/ui/key/binding.go:109 +0x34 github.com/jroimartin/gocui.(*Gui).execKeybindings(0xc004b74000, 0xc0050820f0, 0xc0008f9a58, 0x0, 0x8, 0x9) /Users/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:629 +0xc2 github.com/jroimartin/gocui.(*Gui).onKey(0xc004b74000, 0xc0008f9a58, 0x2, 0x0) /Users/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:593 +0x19b github.com/jroimartin/gocui.(*Gui).handleEvent(...) /Users/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:413 github.com/jroimartin/gocui.(*Gui).MainLoop(0xc004b74000, 0xc000317110, 0xc000331b00) /Users/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:373 +0x1e2 github.com/wagoodman/dive/runtime/ui.Run(0xc000317110, 0xc000331b00, 0xf, 0x10, 0xc000bd19b0, 0xc000bd19e0, 0x0, 0x0) /Users/wagoodman/code/dive/runtime/ui/app.go:144 +0x102 github.com/wagoodman/dive/runtime.run(0xff4d01, 0x0, 0x7ffc5bab20d2, 0xe, 0x1, 0x0, 0x0, 0xc000121500, 0x0, 0x0, ...) /Users/wagoodman/code/dive/runtime/run.go:108 +0x645 created by github.com/wagoodman/dive/runtime.Run /Users/wagoodman/code/dive/runtime/run.go:130 +0x118
Second this. In my case at 13:
panic: runtime error: index out of range [13] with length 13
Could you give https://github.com/wagoodman/dive/pull/395 a spin to see if it helps?
I was experiencing this issue. #395 fixed it for me.
I get the same issue (on v0.11.0) but only when using PGDN.