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 when selecting a broken symlink #9

Closed
thomasave opened this issue Apr 7, 2024 · 9 comments
Closed

Crash when selecting a broken symlink #9

thomasave opened this issue Apr 7, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@thomasave
Copy link

Hi, first of all: nice work! It looks really fancy.
I did however immediately encounter a tiny bug because I had a broken symlink in my home directory.

Reproduce:

  1. ln -s /broken/link test
  2. Open superfile and move the cursor to the test file.

Output:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
   /usr/lib/golang/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
   /usr/lib/golang/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0x7f9300?, 0xc24300?})
   /usr/lib/golang/src/runtime/panic.go:920 +0x270
github.com/MHNightCat/superfile/components.returnMetaData({{{0xc00012f100, 0x1, 0x1}, 0xa8, 0x0}, {{{0xc000198f70, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...})
   /home/nightcat/Documents/code/superfile/src/components/function.go:367 +0x1ef
github.com/MHNightCat/superfile/components.model.Update({{{0xc00012f100, 0x1, 0x1}, 0xa8, 0x0}, {{{0xc000198f70, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...}, ...)
   /home/nightcat/Documents/code/superfile/src/components/model.go:167 +0x109b
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00020fd40, {0x925d18?, 0xc0001c4800?}, 0xc00019eba0?)
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:411 +0x75a
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00020fd40)
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x86e
main.main.func1(0xc00020c160?)
   /home/nightcat/Documents/code/superfile/src/main.go:55 +0x9e
github.com/urfave/cli/v2.(*Command).Run(0xc00020c160, 0xc000146a40, {0xc000118050, 0x1, 0x1})
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x9dd
github.com/urfave/cli/v2.(*App).RunContext(0xc0001e0200, {0x926410?, 0xc65920}, {0xc000118050, 0x1, 0x1})
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
   /home/nightcat/Documents/code/superfile/src/main.go:65 +0xa5
@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

Hi! can u check this ?
If it not working please tell me :)

@thomasave
Copy link
Author

I do have exiftool installed already, if that's what you mean :)

@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

Ok i will check it thanks for report!

@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

@thomasave What is your superfile version?

@thomasave
Copy link
Author

I tried it with v1.0.0 from the releases, but also when building it myself from master (v1.0.1)

@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

Got it thank you

@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

@thomasave This issue has been resolved thanks to your report!!

e89722b

@yorukot yorukot added the bug Something isn't working label Apr 7, 2024
@thomasave
Copy link
Author

I can confirm that it works now, thanks!

Small comment: there's a typo in the related message :)
Link file is broken!(you cant only delete this file)
Should be:
Link file is broken! (you can only delete this file)

@yorukot
Copy link
Owner

yorukot commented Apr 7, 2024

oh yeah thanks!

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