[KPhotoAlbum] crashes when using foreign database
Johannes Zarl-Zierl
johannes at zarl-zierl.at
Tue May 25 22:08:38 BST 2021
Hi Andreas,
Am Dienstag, 25. Mai 2021, 14:54:32 CEST schrieb Andreas Schleth:
> since a few iterations of the current git master I expericence crashes
> when some files in the .thumbnails (or .videothumbnails) folders have
> the wrong owner or strange permissions.
Thanks for reporting this. I'll se if I can reproduce this.
Looking at recent commit history, I don't really see anything that obviously
changed the behaviour in this regard. Roughly speaking: what do you consider a
"few iterations of the current git master"?
> It seems to me that KPA tries to recreate all thumbnails if the
> ownership of some of these files do not match the current owner. Then it
> will invariably hit some files with the orignal rw-r--r-- settings and
> crash.
Since the folder is rwxrwxr-x, removing the file should work, so that is an
additional bug in my eyes.
> a) Why does KPA start rebuilding the thumbnails in first place? The
> rebuild starts each time somebody else accesses the DB. It should just
> take the thumbnails that are present and live with them.
Are all kphotoalbum instances that access the database on the same version?
If you have an older version (pre 5.7), the older kphotoalbum can not read the
newer thumbnail file format. You can convert the thumbnail file to the older
version using kpa-thumbnailtool, though.
> b) Could we not define somewhere in the settings, how we want the
> permissions to be? Right now the permissions seem to be set by some
> system dependent magic.
The current permissions should be rw-r--r-- (if you did not set a umask on
your system to limit it further).
My instinct would be to look at the directory permissions, though, and to
automatically adapt the file permissions depending on the directory
permissions. That way there's no danger in misconfiguring one of the
kphotoalbum instances that access the directory.
> c) I know, that the thumbnail-size is set in the .config/kphotoalbumrc -
> probably differently for each user.
Since kphotoalbum 5.7, kphotoalbum only uses the thumbnail size in
kphotoalbumrc when creating a new thumbnail cache. When opening an existing
thumbnail cache in kphotoalbum >= 5.7, the thumbnail size is stored in the
thumbnailindex file and takes precedence over the value in kphotoalbumrc.
> Alas, I did some more testing (all on a DB not owned by me) permission
> changes done as root, KPA used as myself:
>
> [...]
> I know, all this sounds a bit garbled. It is not meant to be a "real"
> bug message, even if a crashreport is attached, but more to express my
> general pain with the thumbnails in KPA.
If every "real" bug report I got was this detailed, I'd be a happier person
;-) Even without the crash (which is always bug-report-worthy), this is
definitely worthy of a bug report. It may be quite a niche use-case, but one
that we always supported.
At the very least a bug report provide a robust way to track the bug and
reference it in my todo list so that I don't forget it if I don't fix it right
away.
Cheers,
Johannes
More information about the Kphotoalbum
mailing list