Bug 436719 - Thumbnails wont rebuild
Summary: Thumbnails wont rebuild
Status: RESOLVED WORKSFORME
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Thumbnail Viewer (other bugs)
Version First Reported In: 5.7.0
Platform: Debian stable Linux
: NOR major
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 05:27 UTC by isenhand
Modified: 2021-10-10 21:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screen shot of the program stuck at 99% (109.25 KB, image/png)
2021-05-07 05:27 UTC, isenhand
Details
part of the thumbnailsindex file (100.16 KB, image/png)
2021-05-08 06:55 UTC, isenhand
Details
thumbnails directory after rebuilding thumbnails (55.17 KB, image/png)
2021-05-08 06:56 UTC, isenhand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description isenhand 2021-05-07 05:27:27 UTC
Created attachment 138207 [details]
screen shot of the program stuck at 99%

SUMMARY

thumbnails wont rebuild


STEPS TO REPRODUCE
1. Maintenance -> Build Thumbnails
2. wait ...
3. wait all night ...

OBSERVED RESULT

Thumbnails not rebuilt. Program stuck at 99%

EXPECTED RESULT

Thumbnails rebuilt

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian / KDE Plasma 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION

I ran the command yesterday afternoon. It ran up to 99% in a few seconds then stopped. I left it over night and this morning it is still at 99%. I have tried this a few times and rebooted the system in-between.
Comment 1 Johannes Zarl-Zierl 2021-05-08 00:31:41 UTC
Doing a quick check on Debain unstable, I cannot reproduce the issue right away.

Do you have any further information that may be relevant?
If you start kphotoalbum in a text terminal, are there any errors or warnings?
Comment 2 isenhand 2021-05-08 06:53:22 UTC
<<If you start kphotoalbum in a text terminal, are there any errors or warnings?>>

No.

<<Do you have any further information that may be relevant?>>

I did a clean out of temporary files etc. just before this problem occurred. As far as I remember I didn't touch the .thumbnails directory but there could still be a connection.

The program does recreate the thumbnailindex file. The .thumbnails directory has one correct thumbnail. I will add some screen shots.
Comment 3 isenhand 2021-05-08 06:55:50 UTC
Created attachment 138233 [details]
part of the thumbnailsindex file
Comment 4 isenhand 2021-05-08 06:56:29 UTC
Created attachment 138234 [details]
thumbnails directory after rebuilding thumbnails
Comment 5 Johannes Zarl-Zierl 2021-05-10 21:42:22 UTC
(In reply to isenhand from comment #2)
> <<If you start kphotoalbum in a text terminal, are there any errors or
> warnings?>>
> 
> No.
> 
> <<Do you have any further information that may be relevant?>>
> 
> I did a clean out of temporary files etc. just before this problem occurred.
> As far as I remember I didn't touch the .thumbnails directory but there
> could still be a connection.
> 
> The program does recreate the thumbnailindex file. The .thumbnails directory
> has one correct thumbnail. I will add some screen shots.

The thumbnailindex contents look correct (as far as I can tell from just the screenshot). The "one correct thumbnail" is kind of phony, because the file should usually be seen as "data" file, not as an image file by file managers. I guess it's possible, though, that it looks like an image file to dolphin.

How big are the thumb-X files? They should all be almost the same size, around 33 MB (except the last one, which may be smaller).

I assume that running `kpa-thumbnailtool --info /path/to/your/images` prints plausible output as well? How many thumbnails does it show compared to the actual images in your database?
Comment 6 isenhand 2021-05-11 07:28:53 UTC
<<I assume that running `kpa-thumbnailtool --info /path/to/your/images`>>

I ran the command for the menu, so whatever that runs.

I don't remember the file size but the thumbnail index file did list all the correct thumbnails but the thumbnails weren't generated (except one) and then it got stuck at 99%.

What I have done was scarp the lot (except the main index file) and re did everything. It is now working fine.
Comment 7 Johannes Zarl-Zierl 2021-05-11 20:44:03 UTC
Sorry, I meant to run it inside a console window. I should have mentioned this.
You'll get some output like this:

````
Thumbnail cache directory: /data/images/.thumbnails/
Thumbnail index file version: 5
Maximum supported thumbnailindex file version: 5
Thumbnail storage dimensions: 452 pixels
Number of thumbnails: 33 674
````

The number of thumnails should ideally match the number of images in your database, as shown in the lower right corner of the kphotoalbum window.
Comment 8 isenhand 2021-05-12 05:09:56 UTC
Sorry, can't do that now as it is all working but I can say that the thumbnail index file had loads of thumbnails in the list (all correct as far as I could see) but only a handful of thumbnails were produced and only one was correct.
Comment 9 Johannes Zarl-Zierl 2021-10-10 21:21:34 UTC
If it's alright with you I'm closing this bug report for now.
Feel free to reopen it if the problem ever returns!