gdu
gdu copied to clipboard
Application crash on WSL in the mounted disks screen
I installed gdu on Ubuntu 22.04 in WSL and running application with -d
flag (which stands for mounted disks), then I choose the root directory of my disrto (/mnt/wslg/distro
) and got panic error:
user@localhost:~$ 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({0x859b00, 0xc000131a40})
runtime/panic.go:838 +0x207
github.com/dundee/gdu/v5/tui.(*UI).deviceItemSelected(0xc0000d8c60, 0x4b1edb?, 0x4afe2d?)
github.com/dundee/gdu/v5/tui/tui.go:216 +0x405
github.com/rivo/tview.(*Table).InputHandler.func1(0xc000126440, 0x76badf?)
github.com/rivo/tview/table.go:1573 +0x3b7
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0001fc0f0?, 0x40fd87?)
github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Grid).InputHandler.func1(0xc000126440, 0x75dedf?)
github.com/rivo/tview/grid.go:274 +0x1aa
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0000fe240?, 0x7f2dfd8aa800?)
github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Pages).InputHandler.func1(0x40fd87?, 0x10?)
github.com/rivo/tview/pages.go:311 +0xa8
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc00021a030?, 0xc0000bbab8?)
github.com/rivo/tview/box.go:167 +0x53
github.com/rivo/tview.(*Application).Run(0xc000210000)
github.com/rivo/tview/application.go:335 +0x886
github.com/dundee/gdu/v5/tui.(*UI).StartUILoop(0xc0000bbd48?)
github.com/dundee/gdu/v5/tui/tui.go:173 +0x22
github.com/dundee/gdu/v5/cmd/gdu/app.(*App).Run(0xc0000bbd48)
github.com/dundee/gdu/v5/cmd/gdu/app/app.go:145 +0x391
main.runE(0xbe1aa0?, {0xc00006b4a0, 0x0, 0x1})
github.com/dundee/gdu/v5/cmd/gdu/main.go:101 +0x418
github.com/spf13/cobra.(*Command).execute(0xbe1aa0, {0xc000020050, 0x1, 0x1})
github.com/spf13/cobra/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xbe1aa0)
github.com/spf13/cobra/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra/command.go:902
main.main()
github.com/dundee/gdu/v5/cmd/gdu/main.go:105 +0x25
More interesting that after repeating this proccess again everything surprusely worked, but after sometime the error occurs again. It looks strange, so maybe this issue will be helpfull.
What is the version? Mine is 5.21.0-1+b2 and does not give the error
What is the version? Mine is 5.21.0-1+b2 and does not give the error
$ uname -r; lsb_release -a
5.15.90.1-microsoft-standard-WSL2
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
And now I also no longer have the error. Probably this can only happen at first runs...
OK. What is the version of gdu though?
OK. What is the version of gdu though?
$ gdu -v
Version: 5.13.2-1ubuntu0.22.04.1
Built time: 2023-01-30_18:02:34
Built user: debian
Looks to old, I install it from apt
.
The same problem is happening on my Debian system:
$ cat /etc/issue
Debian GNU/Linux 12 \n \l
$ gdu -v
Version: v5.25.0
Built time: Tue Jun 6 02:51:34 PM CEST 2023
Built user: dundee
$ 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/[email protected]/application.go:251 +0x4d
panic({0x560928665cc0, 0xc00079d050})
runtime/panic.go:884 +0x213
github.com/dundee/gdu/v5/tui.(*UI).deviceItemSelected(0xc000702340, 0x1df?, 0x1df?)
github.com/dundee/gdu/v5/tui/tui.go:241 +0x44d
github.com/rivo/tview.(*Table).InputHandler.func1(0xc0002cc540, 0x56092818069f?)
github.com/rivo/[email protected]/table.go:1604 +0x3c3
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0001b4240?, 0x560927fc8ec7?)
github.com/rivo/[email protected]/box.go:167 +0x53
github.com/rivo/tview.(*Grid).InputHandler.func1(0xc0002cc540, 0x5609281692ff?)
github.com/rivo/[email protected]/grid.go:275 +0x1aa
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc000130090?, 0x560928674f00?)
github.com/rivo/[email protected]/box.go:167 +0x53
github.com/rivo/tview.(*Pages).InputHandler.func1(0x560927fc8ec7?, 0x10?)
github.com/rivo/[email protected]/pages.go:311 +0xa7
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc000120270?, 0xc0007c1a10?)
github.com/rivo/[email protected]/box.go:167 +0x53
github.com/rivo/tview.(*Application).Run(0xc0002a6000)
github.com/rivo/[email protected]/application.go:344 +0x57d
github.com/dundee/gdu/v5/tui.(*UI).StartUILoop(0xc000790000?)
github.com/dundee/gdu/v5/tui/tui.go:197 +0x22
github.com/dundee/gdu/v5/cmd/gdu/app.(*App).Run(0xc000790000)
github.com/dundee/gdu/v5/cmd/gdu/app/app.go:166 +0x25c
main.runE(0x560928a15aa0?, {0xc000091680, 0x0, 0x1})
github.com/dundee/gdu/v5/cmd/gdu/main.go:195 +0x745
github.com/spf13/cobra.(*Command).execute(0x560928a15aa0, {0xc000022050, 0x1, 0x1})
github.com/spf13/[email protected]/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x560928a15aa0)
github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:992
main.main()
github.com/dundee/gdu/v5/cmd/gdu/main.go:199 +0x25