Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dive is crashing when browsing layers of paketobuildpacks/run:base-cnb image #396

Closed
asaintsever opened this issue Apr 27, 2022 · 3 comments · Fixed by #395
Closed

Dive is crashing when browsing layers of paketobuildpacks/run:base-cnb image #396

asaintsever opened this issue Apr 27, 2022 · 3 comments · Fixed by #395
Labels
bug Something isn't working

Comments

@asaintsever
Copy link

Using dive 0.10.0

How to repro issue:

  • pull paketobuildpacks/run:base-cnb image
  • dive <paketobuildpacks/run:base-cnb image id>
  • scroll down the layers, dive will end up crashing (see Golang crash dump below)

image

Image Source: docker://13cb3aded743
Fetching image... (this can take a while for large images)
Analyzing image...
Building cache...
panic: runtime error: index out of range [4] with length 4

goroutine 4 [running]:
github.com/wagoodman/dive/runtime/ui/view.(*Layer).CurrentLayer(...)
        /home/runner/work/dive/dive/runtime/ui/view/layer.go:235
github.com/wagoodman/dive/runtime/ui/view.(*Layer).notifyLayerChangeListeners(0xc000176d20, 0x0, 0x4)
        /home/runner/work/dive/dive/runtime/ui/view/layer.go:62 +0x206
github.com/wagoodman/dive/runtime/ui/view.(*Layer).SetCursor(0xc000176d20, 0x4, 0x1, 0x0)
        /home/runner/work/dive/dive/runtime/ui/view/layer.go:225 +0x37
github.com/wagoodman/dive/runtime/ui/view.(*Layer).CursorDown(0xc000176d20, 0x446f53, 0xc00116d7f8)
        /home/runner/work/dive/dive/runtime/ui/view/layer.go:205 +0x8b
github.com/wagoodman/dive/runtime/ui/key.(*Binding).onAction(0xc000523640, 0xc001179b80, 0xc00034a480, 0x5, 0x1)
        /home/runner/work/dive/dive/runtime/ui/key/binding.go:110 +0x34
github.com/awesome-gocui/gocui.(*Gui).execKeybinding(...)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.0/gui.go:747
github.com/awesome-gocui/gocui.(*Gui).execKeybindings(0xc001179b80, 0xc00034a480, 0xc001787a38, 0x8, 0x9, 0x3)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.0/gui.go:733 +0x10b
github.com/awesome-gocui/gocui.(*Gui).onKey(0xc001179b80, 0xc001787a38, 0x2, 0x0)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.0/gui.go:694 +0x176
github.com/awesome-gocui/gocui.(*Gui).handleEvent(...)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.0/gui.go:455
github.com/awesome-gocui/gocui.(*Gui).MainLoop(0xc001179b80, 0x7ffc555e1766, 0xc)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.0/gui.go:415 +0x205
github.com/wagoodman/dive/runtime/ui.Run(0x7ffc555e1766, 0xc, 0xc00026e150, 0xc0004d6300, 0x4, 0x4, 0xc000af3470, 0xc000af34a0, 0x0, 0x0)
        /home/runner/work/dive/dive/runtime/ui/app.go:145 +0x10d
github.com/wagoodman/dive/runtime.run(0xee6f01, 0x0, 0x7ffc555e1766, 0xc, 0x1, 0x0, 0x0, 0x0, 0xc00010f600, 0x0, ...)
        /home/runner/work/dive/dive/runtime/run.go:110 +0x5d3
created by github.com/wagoodman/dive/runtime.Run
        /home/runner/work/dive/dive/runtime/run.go:132 +0x132
@mark2185
Copy link
Contributor

mark2185 commented Apr 27, 2022

That should be solved by #395, could you give it a try?

@asaintsever
Copy link
Author

Thanks @mark2185 for pointing this PR to me. I did the test and can confirm that it successfully fixes the issue :-)

@asaintsever
Copy link
Author

Closing issue, solved by #395

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants