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

[ERROR] index out of range when reaching end of layers list #295

Open
MonsieurRz opened this issue Apr 9, 2020 · 4 comments
Open

[ERROR] index out of range when reaching end of layers list #295

MonsieurRz opened this issue Apr 9, 2020 · 4 comments

Comments

@MonsieurRz
Copy link

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

@TBeijen
Copy link

TBeijen commented Apr 18, 2020

Second this. In my case at 13:

panic: runtime error: index out of range [13] with length 13

@mark2185
Copy link
Contributor

Could you give #395 a spin to see if it helps?

@silviot
Copy link

silviot commented Nov 23, 2022

I was experiencing this issue. #395 fixed it for me.

@rpl-ian-lunam
Copy link

rpl-ian-lunam commented Nov 30, 2023

I get the same issue (on v0.11.0) but only when using PGDN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants