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

Sharing: Upload panics if file has been deleted #3379

Closed
lastzero opened this issue May 6, 2023 · 0 comments
Closed

Sharing: Upload panics if file has been deleted #3379

lastzero opened this issue May 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@lastzero
Copy link
Member

lastzero commented May 6, 2023

A worker panic may occur if you have selected files for upload that no longer exist, for example because they have been deleted:

2023-05-04 11:00:22 WARN share: share: runtime error: invalid memory address or
nil pointer dereference (worker panic) stack: goroutine 14703 [running]:
runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/photoprism/photoprism/internal/workers.(*Share).Start.func1()
/go/src/github.com/photoprism/photoprism/internal/workers/share.go:42 +0x45
panic({0x10440a0, 0x28354e0}) /usr/local/go/src/runtime/panic.go:890 +0x263
github.com/photoprism/photoprism/internal/workers.(*Share).Start(0xc00052ffc8)
/go/src/github.com/photoprism/photoprism/internal/workers/share.go:110 +0xac5
github.com/photoprism/photoprism/internal/workers.RunShare.func1()
/go/src/github.com/photoprism/photoprism/internal/workers/workers.go:96 +0x35
created by github.com/photoprism/photoprism/internal/workers.RunShare
/go/src/github.com/photoprism/photoprism/internal/workers/workers.go:94 +0x6a

Instead, the worker must verify that a record exists before proceeding with the upload.

@lastzero lastzero added the bug Something isn't working label May 6, 2023
@lastzero lastzero self-assigned this May 6, 2023
lastzero added a commit that referenced this issue May 6, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero added please-test Ready for acceptance test tested Changes have been tested successfully and removed please-test Ready for acceptance test labels May 6, 2023
@lastzero lastzero closed this as completed May 6, 2023
@lastzero lastzero added released Available in the stable release and removed tested Changes have been tested successfully labels Jun 3, 2023
@lastzero lastzero reopened this Jun 3, 2023
@lastzero lastzero closed this as completed Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

1 participant