| Summary: | When adding a new collection, tags are not associated with images when using sidecars file and tags hierarchy | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Mistermoonlight <spiderman110> |
| Component: | Tags-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 8.7.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://invent.kde.org/graphics/digikam/-/commit/656957227df040c2b206ea174b7987acfa244e05 | Version Fixed/Implemented In: | 8.8.0 |
| Sentry Crash Report: | |||
| Attachments: | metadata small test set | ||
|
Description
Mistermoonlight
2025-08-09 18:48:31 UTC
Can you share few items to try to reproduce the dysfunction ? I will try to provide something with few anonymous images... I'm sure I can't reproduce it. This problem has been reported several times under Windows, where not all metadata is found during the initial scan. We suspect either a locked collection directory because other programs are accessing it at the same time, or a database lock issue. If you can always reproduce it, please create a DebugView log as described here for Windows: https://www.digikam.org/contribute/#windows-host Please also test the pre-release digiKam-8.8.0 version, as we now also support long file paths, this can also be a cause: https://files.kde.org/digikam/ Maik Created attachment 183939 [details]
metadata small test set
I have build a small test set (attached), but i am not sure now that this is the same behavior of what i encountered first when i initially reported it. The behavior is different, maybe i wrongly understood it the 1st time. But i can still generate with the test set a similar problem i guess. When the test set is imported, it is creating the tags correctly i guess with the test set. Then i am going in the settings and delete the configured collection associated with the test set. Then i am going in the tag manager and choose all the tags and remove tags from images (should not do anything i guess, images are gone), then from there delete all the tags completly. Then in the maintenance menu, choose perform database cleaning and selects the 4 choice (full cleanup). So at this point, i am expecting that all tags are deleted, collection was deleted, database fully cleaned, so if i am creating the same test set collection again(attached) using the same directory path where is located the test set at the first time, i am getting the bug: the full hierarchy of the tags are created, but no image are associated to any tag! If i am doing a maintenance of the database again with reimports metadata from the files, it repair fully the problem and all images are becoming associated to metadata again. I am not quite sure if it is the same behavior as the original behavior or if there are mutiple possible ways to create this problem, but at least there is something wrong here that does not look as bad as i 1st reported. Different way to create the problem and maybe there are others? I guess the database has something bad after collection deleted, tag cleaning and maintenace full cleanup that is causing this behavior. Sorry guys for the misunderstanding about this problem...
Without having tested the test set at the moment, we do reuse deleted or "lost" items in the database once the item scanner has retrieved the file based on its UUID. The idea is to avoid unnecessary file rescanning. On second thought, this could be problematic in the case of sidecars. I'll investigate this further. Maik Git commit 656957227df040c2b206ea174b7987acfa244e05 by Maik Qualmann. Committed on 11/08/2025 at 18:59. Pushed by mqualmann into branch 'master'. if reading sidecars is enabled ignore stale database images FIXED-IN: 8.8.0 M +1 -1 NEWS M +15 -13 core/libs/database/item/scanner/itemscanner_database.cpp M +12 -11 core/libs/database/item/scanner/itemscanner_p.h https://invent.kde.org/graphics/digikam/-/commit/656957227df040c2b206ea174b7987acfa244e05 |