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

Application crash on WSL in the mounted disks screen #225

Open
cheatsnake opened this issue Mar 4, 2023 · 5 comments
Open

Application crash on WSL in the mounted disks screen #225

cheatsnake opened this issue Mar 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@cheatsnake
Copy link

cheatsnake commented Mar 4, 2023

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.

@daniejstriata
Copy link
Collaborator

What is the version? Mine is 5.21.0-1+b2 and does not give the error

@cheatsnake
Copy link
Author

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...

@daniejstriata
Copy link
Collaborator

OK. What is the version of gdu though?

@cheatsnake
Copy link
Author

cheatsnake commented Mar 7, 2023

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.

@inso
Copy link

inso commented Jun 12, 2023

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/tview@v0.0.0-20230530133550-8bd761dda819/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/tview@v0.0.0-20230530133550-8bd761dda819/table.go:1604 +0x3c3
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc0001b4240?, 0x560927fc8ec7?)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/box.go:167 +0x53
github.com/rivo/tview.(*Grid).InputHandler.func1(0xc0002cc540, 0x5609281692ff?)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/grid.go:275 +0x1aa
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc000130090?, 0x560928674f00?)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/box.go:167 +0x53
github.com/rivo/tview.(*Pages).InputHandler.func1(0x560927fc8ec7?, 0x10?)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/pages.go:311 +0xa7
github.com/rivo/tview.(*Box).WrapInputHandler.func1(0xc000120270?, 0xc0007c1a10?)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/box.go:167 +0x53
github.com/rivo/tview.(*Application).Run(0xc0002a6000)
	github.com/rivo/tview@v0.0.0-20230530133550-8bd761dda819/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/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x560928a15aa0)
	github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
	github.com/dundee/gdu/v5/cmd/gdu/main.go:199 +0x25

@dundee dundee added the bug Something isn't working label Jun 13, 2023
@dundee dundee self-assigned this Jun 13, 2023
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

No branches or pull requests

4 participants