SmilyOrg / photofield

Experimental fast photo viewer.
MIT License
410 stars 7 forks source link

Panic: no migration #6

Closed luusl closed 2 years ago

luusl commented 2 years ago

Describe the bug When trying to start the application first time in windows 10 it ended up with panic: no migration. Do I need to configure something? After start I have a new 12k sized file called photofield.cache.db in the directory.

To Reproduce Steps to reproduce the behavior:

  1. open photofield.exe

Expected behavior Successful start.

Screenshots

PS C:\Users\Downloads\photofield_0.3.0_Windows_x86_64> .\photofield.exe
2022/06/14 17:19:22 photofield 0.3.0
2022/06/14 17:19:22 unable to open configuration.yaml, using defaults (open configuration.yaml: The system cannot find the file specified.)
2022/06/14 17:19:22 unable to use exiftool, defaulting to goexif - no video metadata support (Could not create StayOpen: Failed starting exiftool in stay_open mode: exec: "exiftool": executable file not found in %PATH%)
panic: no migration

goroutine 1 [running]:
photofield/internal/image.(*Database).migrate(0xc00015dd40, {0xc0000d77b8})
        /home/runner/work/photofield/photofield/internal/image/database.go:138 +0x295
photofield/internal/image.NewDatabase({0xc000132648, 0x13}, {0xd19e99})
        /home/runner/work/photofield/photofield/internal/image/database.go:90 +0x6b
photofield/internal/image.NewSource({{0xc000132648, 0x13}, 0x4, 0x0, 0x8, 0x4, {0xc00015d7c0, 0x4, 0x4}, {0xc0001473a0, ...}, ...}, ...)
        /home/runner/work/photofield/photofield/internal/image/source.go:85 +0xe5
main.main()
        /home/runner/work/photofield/photofield/main.go:937 +0x5df

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

SmilyOrg commented 2 years ago

Hi! Looks like a bug indeed, I'll take a look when I get the chance, thanks for reporting!

Meanwhile you could try the previous version. It's pretty much functionally equivalent (sorry for the shitty release notes 😅).

https://github.com/SmilyOrg/photofield/releases/tag/v0.2.1

luusl commented 2 years ago

Thanks for the answer. Launching v0.2.1 works, then launching v0.3.0 works as well. I can live with this workaround.

SmilyOrg commented 2 years ago

Just released https://github.com/SmilyOrg/photofield/releases/tag/v0.3.1 which should fix this and another thing I noticed. It also includes your PR, thanks!

Please reopen/let me know if you still see this issue.