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

panic: interface conversion #315

Closed
axet opened this issue Feb 15, 2024 · 3 comments · Fixed by #318
Closed

panic: interface conversion #315

axet opened this issue Feb 15, 2024 · 3 comments · Fixed by #318
Assignees
Labels
bug Something isn't working

Comments

@axet
Copy link

axet commented Feb 15, 2024

Running 'gdu -d' first time causing a crash. Second run, works fine.

gdu 5.22.0-1+b1 (debian 12)

axet@axet-laptop:~/bin$ gdu -d
panic: interface conversion: interface {} is nil, not *device.Device [recovered]
	panic: interface conversion: interface {} is nil, not *device.Device

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1()
	github.com/rivo/tview/application.go:243 +0x4d
panic({0x8ca040, 0xc0003500c0})
	runtime/panic.go:884 +0x212
github.com/dundee/gdu/v5/tui.(*UI).deviceItemSelected(0xc0000a4340, 0x8?, 0x1e4?)
	github.com/dundee/gdu/v5/tui/tui.go:228 +0x465
github.com/rivo/tview.(*Table).InputHandler.func1(0xc000024e40, 0x5a5c5f?)
	github.com/rivo/tview/table.go:1577 +0x3c3
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0000ce000?, 0x40ff67?)
	github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Grid).InputHandler.func1(0xc000024e40, 0x5934df?)
	github.com/rivo/tview/grid.go:275 +0x1aa
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0000d0000?, 0x7fe3ce625c08?)
	github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Pages).InputHandler.func1(0x40ff67?, 0x10?)
	github.com/rivo/tview/pages.go:311 +0xa7
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0000b0240?, 0xc0001cd958?)
	github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Application).Run(0xc0000aa000)
	github.com/rivo/tview/application.go:335 +0x77d
github.com/dundee/gdu/v5/tui.(*UI).StartUILoop(0xc0000ac000?)
	github.com/dundee/gdu/v5/tui/tui.go:184 +0x22
github.com/dundee/gdu/v5/cmd/gdu/app.(*App).Run(0xc0000ac000)
	github.com/dundee/gdu/v5/cmd/gdu/app/app.go:164 +0x25c
main.runE(0xc9ad40?, {0xc0001195b0, 0x0, 0x1})
	github.com/dundee/gdu/v5/cmd/gdu/main.go:199 +0x825
github.com/spf13/cobra.(*Command).execute(0xc9ad40, {0xc00012c010, 0x1, 0x1})
	github.com/spf13/cobra/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc9ad40)
	github.com/spf13/cobra/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra/command.go:968
main.main()
	github.com/dundee/gdu/v5/cmd/gdu/main.go:203 +0x25
dundee added a commit that referenced this issue Feb 15, 2024
@dundee dundee self-assigned this Feb 15, 2024
@dundee dundee added the bug Something isn't working label Feb 15, 2024
dundee added a commit that referenced this issue Feb 15, 2024
@dundee
Copy link
Owner

dundee commented Feb 15, 2024

Thanks for your report. I think I have found the root cause and fixed it.

@axet
Copy link
Author

axet commented Feb 16, 2024

I know how to reproduce the issue:

  1. gdu -d
  2. scroll down to the last entry
  3. press down again
  4. hit enter

dundee added a commit that referenced this issue Feb 16, 2024
@dundee
Copy link
Owner

dundee commented Feb 16, 2024

Thank you! That helped a lot. I have found the real root cause and fixed it.

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

Successfully merging a pull request may close this issue.

2 participants