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

Crash on order disk by size #88

Closed
danstreeter opened this issue Aug 26, 2021 · 4 comments
Closed

Crash on order disk by size #88

danstreeter opened this issue Aug 26, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@danstreeter
Copy link

When running with the -d flag and trying to order by size with s - a crash occurs with the followng output:

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=0x10 pc=0x55f6aa158bd8]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1()
	github.com/rivo/[email protected]/application.go:243 +0x4d
panic({0x55f6aa38b3a0, 0x55f6aa560a90})
	runtime/panic.go:1038 +0x215
github.com/dundee/gdu/v5/pkg/analyze.(*Dir).GetPath(0x1)
	github.com/dundee/gdu/v5/pkg/analyze/file.go:139 +0x18
github.com/dundee/gdu/v5/tui.(*UI).showDir(0xc000126240)
	github.com/dundee/gdu/v5/tui/tui.go:181 +0x45
github.com/dundee/gdu/v5/tui.(*UI).setSorting(0xc000126240, {0x55f6aa1d287d, 0x4})
	github.com/dundee/gdu/v5/tui/tui.go:382 +0x15a
github.com/dundee/gdu/v5/tui.(*UI).keyPressed(0xc000126240, 0xc000010040)
	github.com/dundee/gdu/v5/tui/keys.go:119 +0x6cc
github.com/rivo/tview.(*Application).Run(0xc000220000)
	github.com/rivo/[email protected]/application.go:318 +0x6d2
github.com/dundee/gdu/v5/tui.(*UI).StartUILoop(0xc000126240)
	github.com/dundee/gdu/v5/tui/tui.go:163 +0x22
github.com/dundee/gdu/v5/cmd/gdu/app.(*App).Run(0xc000137d60)
	github.com/dundee/gdu/v5/cmd/gdu/app/app.go:120 +0x2d2
main.runE(0x55f6aa566300, {0xc00008cb80, 0x0, 0x1})
	github.com/dundee/gdu/v5/cmd/gdu/main.go:96 +0x418
github.com/spf13/cobra.(*Command).execute(0x55f6aa566300, {0xc0000aa010, 0x1, 0x1})
	github.com/spf13/[email protected]/command.go:852 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0x55f6aa566300)
	github.com/spf13/[email protected]/command.go:960 +0x3ad
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
main.main()
	github.com/dundee/gdu/v5/cmd/gdu/main.go:100 +0x25

Appreciate there isnt much system debug information here, so please advise what, if anything you'd like to know and I can get it and provide.

@dundee dundee self-assigned this Aug 27, 2021
@dundee dundee added the bug Something isn't working label Aug 27, 2021
@dundee dundee closed this as completed in 49eb695 Aug 27, 2021
dundee added a commit that referenced this issue Aug 27, 2021
@danstreeter
Copy link
Author

Hi @dundee - thanks for the rapid fix

I can confirm that the crash no longer happens, however perfoming a 'sort by size' on a 'disk display' (-d then s as above) now does not change the ordering of disks shown at all - their order remains how they were loaded, out of size order.

@dundee
Copy link
Owner

dundee commented Aug 27, 2021

Sorting was always possible only on the 'file/dir display' but I think it will be a nice feature to add it to disks list as well. Thanks for suggestion!

@danstreeter
Copy link
Author

Ah ok that makes sense why it doesn’t work then! =)
To be honest didn’t check if it was a feature or not - just went for it as am performing a home server migration and wanted to quickly see where the bulk of space was being used across drives.
Perfect use case and way quicker than ncdu.

Thanks for the great project.

@dundee
Copy link
Owner

dundee commented Sep 6, 2021

Sorting of devices added in 5.7.0

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

2 participants