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

Panic while rescanning directory #196

Closed
BkSouX opened this issue Feb 14, 2021 · 6 comments
Closed

Panic while rescanning directory #196

BkSouX opened this issue Feb 14, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@BkSouX
Copy link
Contributor

BkSouX commented Feb 14, 2021

Hi,
I was trying the latest version (2.1.0) and I just got a panic while rescanning my directory (after adding new directories into it).

It was processing a photo that was already there before.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5a28d4]

goroutine 80953 [running]:
github.com/photoview/photoview/api/scanner/exif.SaveEXIF(0x2755740, 0x3305b30, 0x3305b30, 0x2585320, 0xe)
	/app/scanner/exif/exif.go:50 +0x278
github.com/photoview/photoview/api/scanner.ScanMedia(0x2755740, 0x31acea0, 0x2a, 0x7f9, 0x2610660, 0x0, 0x76b5d8, 0x2755740, 0x0)
	/app/scanner/scanner_media.go:169 +0x3dc
github.com/photoview/photoview/api/scanner.findMediaForAlbum.func1(0x2755740, 0x0, 0x0)
	/app/scanner/scanner_album.go:141 +0x58
gorm.io/gorm.(*DB).Transaction(0x259cd80, 0x2755720, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/pkg/mod/gorm.io/gorm@v1.20.12/finisher_api.go:552 +0x2c4
github.com/photoview/photoview/api/scanner.findMediaForAlbum(0x26aade0, 0x2610660, 0x259cd80, 0x38e7ba0, 0x21, 0x100, 0x278cedc, 0x21, 0x24aa080)
	/app/scanner/scanner_album.go:140 +0x208
github.com/photoview/photoview/api/scanner.scanAlbum(0x26aade0, 0x2610660, 0x259cd80)
	/app/scanner/scanner_album.go:57 +0x17c
github.com/photoview/photoview/api/scanner.(*ScannerJob).Run(...)
	/app/scanner/queue.go:22
github.com/photoview/photoview/api/scanner.(*ScannerQueue).startBackgroundWorker.func1(0x38e9060, 0xc49380)
	/app/scanner/queue.go:93 +0x6c
created by github.com/photoview/photoview/api/scanner.(*ScannerQueue).startBackgroundWorker
	/app/scanner/queue.go:91 +0xa

Using arm version.
5 workers

@viktorstrate
Copy link
Member

Okay thank you, it looks like an easy fix.
It's probably happends if exif.DateShot == nil.

if !exif.DateShot.Equal(media.DateShot) {

@viktorstrate viktorstrate added the bug Something isn't working label Feb 14, 2021
@viktorstrate
Copy link
Member

@BkSouX I've pushed an attempt at fixing it.
Would you mind testing if the changes fixed it by pulling the viktorstrate/photoview:edge docker tag, when the build action is finished?

@BkSouX
Copy link
Contributor Author

BkSouX commented Feb 14, 2021

yes of course, i ll do that

@BkSouX
Copy link
Contributor Author

BkSouX commented Feb 14, 2021

i have a lot of photos to scan.. scanning in progress 😆

@BkSouX
Copy link
Contributor Author

BkSouX commented Feb 14, 2021

it seems to be fine, still no errors.

@viktorstrate
Copy link
Member

Awesome a new release will be pushed very soon, when #195 is solved.

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