SmilyOrg / photofield

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

Crash reloading collections while scanning #109

Open SmilyOrg opened 4 months ago

SmilyOrg commented 4 months ago

That said, looks like there might be similar trouble in the collection scanner:

...
index metadata   88% completed, 14996 loaded,  1897 pending, 65.52 / sec, 29s left
collection changed, reloading
config path configuration.yaml
index metadata   89% completed, 15127 loaded,  1766 pending, 64.65 / sec, 27s left
index metadata   90% completed, 15258 loaded,  1635 pending, 65.36 / sec, 25s left
index metadata   91% completed, 15403 loaded,  1490 pending, 70.91 / sec, 21s left
database closing
panic: send on closed channel
goroutine 208 [running]:
photofield/internal/image.(*Database).Write(...)
        /home/runner/work/photofield/photofield/internal/image/database.go:907
photofield/internal/image.(*Source).indexMetadata(0xc0004cc300, 0x0?)
        /home/runner/work/photofield/photofield/internal/image/indexMetadata.go:19 +0x286
created by photofield/internal/queue.(*Queue).Run in goroutine 146
        /home/runner/work/photofield/photofield/internal/queue/queue.go:42 +0x37a

This is from removing one subdirectory of a collection (with expand_subdirs: true) whilst scanning a different one.

Originally posted by @Terrance in https://github.com/SmilyOrg/photofield/issues/97#issuecomment-1953197820