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

runtime error: invalid memory address or nil pointer dereference on M1 and ARM64 #16

Closed
ScrumpyJack opened this issue Feb 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ScrumpyJack
Copy link

🦄 ❯ ~/foto preview
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x405668]

goroutine 1 [running]:
github.com/waynezhang/foto/internal/indexer.buildImageSets.func1({0x40000a82b8, 0x12}, {0x0?, 0x0?}, {0x40000ed818?, 0x405408?})
/home/runner/work/foto/foto/internal/indexer/indexer.go:71 +0x28
path/filepath.WalkDir({0x40000a82b8, 0x12}, 0x40000ed878)
/opt/hostedtoolcache/go/1.21.5/x64/src/path/filepath/path.go:530 +0x50
github.com/waynezhang/foto/internal/indexer.buildImageSets({0x40000a82b8, 0x12}, 0x0, {0x40000ed9b8?, 0x40000ed928?})
/home/runner/work/foto/foto/internal/indexer/indexer.go:70 +0xb4
github.com/waynezhang/foto/internal/indexer.Build({0x40000a42d0, 0x2, 0x0?}, {0x0?, 0x0?})
/home/runner/work/foto/foto/internal/indexer/indexer.go:54 +0x20c
github.com/waynezhang/foto/internal/cmd.preview(0x4000180200?, {0x57d042?, 0x4?, 0x57d046?})
/home/runner/work/foto/foto/internal/cmd/preview.go:35 +0x9c
github.com/spf13/cobra.(*Command).execute(0x40001b4600, {0x9f47e0, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x40001b4900)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/waynezhang/foto/internal/cmd.Execute()
/home/runner/work/foto/foto/internal/cmd/root.go:38 +0x1b8
main.main()
/home/runner/work/foto/foto/main.go:8 +0x1c

🦄 ❯ foto version
foto v1.2.1+a96a5e3

🦄 ❯ uname -por
5.15.93-rockchip64 aarch64 GNU/Linux

Any thoughts?
I can supply a trace if needed

@waynezhang
Copy link
Owner

@ScrumpyJack hi, thanks for reporting the issue. I think it was caused by the folder configuration issue (no permission, wrong directory, etc...). Could you please check the config file again?
I also pushed a new version 1.2.2 which includes this fix. The crash should be gone and there should be some error message to report the actual error.
Thanks!

@waynezhang waynezhang added the bug Something isn't working label Mar 1, 2024
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