Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

runtime errors #133

Open
weakcamel opened this issue Feb 29, 2020 · 1 comment
Open

runtime errors #133

weakcamel opened this issue Feb 29, 2020 · 1 comment

Comments

@weakcamel
Copy link

docui crashes very often when trying to press 'd' to delete volumes or containers
My suspicion is, it's mostly when the volume has been already deleted but is not yet gone from the UI (pressing d twice).
Also a crash when pressing 'd' in an empty list of containers.

$ docui
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x147c933]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc000360280)
	/go/pkg/mod/github.com/rivo/[email protected]/application.go:149 +0x82
panic(0x1512480, 0x19f8e10)
	/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/skanehira/docui/gui.(*Gui).removeContainer.func1()
	/go/src/github.com/skanehira/docui/gui/keybindings.go:337 +0x33
github.com/skanehira/docui/gui.(*Gui).confirm.func1(0x0, 0x159f80f, 0x4)
	/go/src/github.com/skanehira/docui/gui/gui.go:295 +0xbf
github.com/rivo/tview.(*Modal).AddButtons.func1.1()
	/go/pkg/mod/github.com/rivo/[email protected]/modal.go:86 +0x53
github.com/rivo/tview.(*Button).InputHandler.func1(0xc00000cae0, 0xc0003f4050)
	/go/pkg/mod/github.com/rivo/[email protected]/button.go:129 +0x69
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc00000cae0, 0xc0003f4050)
	/go/pkg/mod/github.com/rivo/[email protected]/box.go:152 +0x5d
github.com/rivo/tview.(*Application).Run(0xc000360280, 0x0, 0x0)
	/go/pkg/mod/github.com/rivo/[email protected]/application.go:234 +0x396
github.com/skanehira/docui/gui.(*Gui).Start(0xc0003660a0, 0xc0003660a0, 0xc00036a240)
	/go/src/github.com/skanehira/docui/gui/gui.go:211 +0x4e
main.run(0xc000098120)
	/go/src/github.com/skanehira/docui/main.go:35 +0x33b
main.main()
	/go/src/github.com/skanehira/docui/main.go:45 +0x74

and

$ docui
panic: runtime error: index out of range [recovered]
	panic: runtime error: index out of range

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc000358300)
	/go/pkg/mod/github.com/rivo/[email protected]/application.go:149 +0x82
panic(0x1512480, 0x19f8e50)
	/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/skanehira/docui/gui.(*Gui).selectedVolume(0xc000237ac0, 0x0)
	/go/src/github.com/skanehira/docui/gui/gui.go:259 +0x9f
github.com/skanehira/docui/gui.(*Gui).removeVolume(0xc000237ac0)
	/go/src/github.com/skanehira/docui/gui/keybindings.go:349 +0x2f
github.com/skanehira/docui/gui.(*volumes).setKeybinding.func1(0xc000236020, 0xc0003dc001)
	/go/src/github.com/skanehira/docui/gui/volumes.go:55 +0x87
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc000236020, 0xc0003dc010)
	/go/pkg/mod/github.com/rivo/[email protected]/box.go:149 +0x75
github.com/rivo/tview.(*Application).Run(0xc000358300, 0x0, 0x0)
	/go/pkg/mod/github.com/rivo/[email protected]/application.go:234 +0x396
github.com/skanehira/docui/gui.(*Gui).Start(0xc000237ac0, 0xc000237ac0, 0xc000243200)
	/go/src/github.com/skanehira/docui/gui/gui.go:211 +0x4e
main.run(0xc00009e0c0)
	/go/src/github.com/skanehira/docui/main.go:35 +0x33b
main.main()
	/go/src/github.com/skanehira/docui/main.go:45 +0x74
@weakcamel
Copy link
Author

Details of my environment:

$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:34 2019
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:29:19 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
$ brew list docui
/usr/local/Cellar/docui/2.0.4/bin/docui

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

No branches or pull requests

1 participant