Skip to content

Crash when extracting a file #620

@porridge

Description

@porridge

What happened:

The tool segfaulted.

What you expected to happen:

Extracted a file.

How to reproduce it (as minimally and precisely as possible):

  1. dive quay.io/rhacs-eng/stackrox-operator-index:v4.9.0-189-g2f71a07a8e
  2. 5 x ⬇️
  3. TAB
  4. CTRL+F
  5. type configs
  6. ENTER
  7. TAB TAB
  8. ⬇️
  9. CTRL+E

Anything else we need to know?:

[~]$ dive quay.io/rhacs-eng/stackrox-operator-index:v4.9.0-189-g2f71a07a8e
Image Source: docker://quay.io/rhacs-eng/stackrox-operator-index:v4.9.0-189-g2f71a07a8e
Extracting image from docker-engine... (this can take a while for large images)
Analyzing image...
Building cache...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x715f92]

goroutine 19 [running]:
github.com/wagoodman/dive/dive/filetree.(*FileNode).Path(0xc0005358e8?)
	/Users/wagoodman/code/dive/dive/filetree/file_node.go:276 +0x12
github.com/wagoodman/dive/runtime/ui/view.(*FileTree).extractFile(0xc000190460)
	/Users/wagoodman/code/dive/runtime/ui/view/filetree.go:321 +0x78
github.com/wagoodman/dive/runtime/ui/key.(*Binding).onAction(0x3?, 0x3?, 0x2?)
	/Users/wagoodman/code/dive/runtime/ui/key/binding.go:111 +0x1c
github.com/awesome-gocui/gocui.(*Gui).execKeybinding(0xc0005359d8?, 0x74d3c8?, 0xc001364460?)
	/Users/wagoodman/go/pkg/mod/github.com/awesome-gocui/[email protected]/gui.go:947 +0x4f
github.com/awesome-gocui/gocui.(*Gui).execKeybindings(0xc000fa4000, 0xc0001cef00, 0xc000535a98)
	/Users/wagoodman/go/pkg/mod/github.com/awesome-gocui/[email protected]/gui.go:926 +0x155
github.com/awesome-gocui/gocui.(*Gui).onKey(0xc000fa4000, 0xc000535a98)
	/Users/wagoodman/go/pkg/mod/github.com/awesome-gocui/[email protected]/gui.go:882 +0x5d
github.com/awesome-gocui/gocui.(*Gui).handleEvent(0xc000535ae0?, 0xc000535a8c?)
	/Users/wagoodman/go/pkg/mod/github.com/awesome-gocui/[email protected]/gui.go:554 +0x2a
github.com/awesome-gocui/gocui.(*Gui).MainLoop(0xc000fa4000)
	/Users/wagoodman/go/pkg/mod/github.com/awesome-gocui/[email protected]/gui.go:504 +0x22a
github.com/wagoodman/dive/runtime/ui.Run({0x7fffe7251708, 0x40}, {0xa26190, 0xd8c8c0}, 0xc0001ddb90, {{0xc00019e4c0, 0x6, 0x8}, 0xc00014b440, 0xc00014b470})
	/Users/wagoodman/code/dive/runtime/ui/app.go:160 +0x17a
github.com/wagoodman/dive/runtime.run(0x1, {0x0, {0x7fffe7251708, 0x40}, 0x1, 0x0, {0x0, 0x0}, 0xc0001ce300, {0x0, ...}}, ...)
	/Users/wagoodman/code/dive/runtime/run.go:111 +0x1045
created by github.com/wagoodman/dive/runtime.Run in goroutine 1
	/Users/wagoodman/code/dive/runtime/run.go:133 +0x2bb

Environment:

  • OS version: Fedora 41
  • Docker version (if applicable):
[~]$ docker version
Client:
 Version:           28.3.0
 API version:       1.51
 Go version:        go1.23.10
 Git commit:        1.fc41
 Built:             Wed Jun 25 00:00:00 2025
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          28.3.0
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.23.10
  Git commit:       1.fc41
  Built:            Wed Jun 25 00:00:00 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        1.fc41
 runc:
  Version:          1.3.0
  GitCommit:        
 tini-static:
  Version:          0.19.0
  GitCommit:        

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions