Bug 490821 - digiKam fails to write tags/ratings to image files
Summary: digiKam fails to write tags/ratings to image files
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Maintenance-Metadata (other bugs)
Version First Reported In: 8.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-25 16:18 UTC by eberhard.morgenroth
Modified: 2025-04-11 18:13 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eberhard.morgenroth 2024-07-25 16:18:48 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY I use digiKam to assign tags and ratings to images. I ask digiKam to sync from database to metadata (in Maintenance) . Some of the tags/ratings are assigned to images. But it does not work for most of the images.

In the setup I have exiftool.exe Version 12.89 installed.


STEPS TO REPRODUCE
1. Run Maintenance with sync from database to metadata 
2. Check image files for tags and ratings > They are not written to the files
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 11
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2024-07-25 17:50:35 UTC
We need a DebugView log of the metadata writing process, instructions for Windows are here:

https://www.digikam.org/contribute/

Does the problem occur randomly or is it reproducible with certain images? If reproducible, we need a sample image.

Please also test the pre-release of digiKam-8.5.0 to see if the problem also occurs, from here:

https://files.kde.org/digikam/

Maik
Comment 2 Maik Qualmann 2024-07-28 09:00:37 UTC
Git commit 341ffaa20f5d37775169d2b86f729c0014bb2fc7 by Maik Qualmann.
Committed on 28/07/2024 at 08:57.
Pushed by mqualmann into branch 'master'.

do not rescan item after writing metadata
Related: bug 490484

M  +2    -2    core/libs/database/engine/dbenginebackend.cpp
M  +3    -14   core/libs/database/utils/ifaces/itemgps.cpp
M  +3    -20   core/libs/fileactionmanager/fileworkeriface.cpp
M  +1    -2    core/libs/properties/captions/itemdescedittab.cpp
M  +1    -2    core/libs/tags/engine/tagmodificationhelper.cpp
M  +1    -8    core/libs/threads/actionthreadbase.cpp
M  +3    -7    core/utilities/facemanagement/database/faceutils.cpp
M  +1    -2    core/utilities/imageeditor/main/imagewindow.cpp
M  +1    -3    core/utilities/maintenance/tools/autotags/autotagsassignmenttask.cpp
M  +1    -3    core/utilities/maintenance/tools/imgqsort/imagequalitytask.cpp
M  +1    -3    core/utilities/maintenance/tools/metaremover/metadataremovetask.cpp
M  +2    -5    core/utilities/maintenance/tools/metasync/metadatasynctask.cpp
M  +1    -3    core/utilities/queuemanager/manager/actionthread.cpp

https://invent.kde.org/graphics/digikam/-/commit/341ffaa20f5d37775169d2b86f729c0014bb2fc7
Comment 3 Maik Qualmann 2024-07-28 09:04:33 UTC
Git commit 15101d696baf5491abb60be9013fadf3b5dd0b3c by Maik Qualmann.
Committed on 28/07/2024 at 09:03.
Pushed by mqualmann into branch 'master'.

Revert "do not rescan item after writing metadata"
Related: bug 490484

M  +2    -2    core/libs/database/engine/dbenginebackend.cpp
M  +14   -3    core/libs/database/utils/ifaces/itemgps.cpp
M  +20   -3    core/libs/fileactionmanager/fileworkeriface.cpp
M  +2    -1    core/libs/properties/captions/itemdescedittab.cpp
M  +2    -1    core/libs/tags/engine/tagmodificationhelper.cpp
M  +8    -1    core/libs/threads/actionthreadbase.cpp
M  +7    -3    core/utilities/facemanagement/database/faceutils.cpp
M  +2    -1    core/utilities/imageeditor/main/imagewindow.cpp
M  +3    -1    core/utilities/maintenance/tools/autotags/autotagsassignmenttask.cpp
M  +3    -1    core/utilities/maintenance/tools/imgqsort/imagequalitytask.cpp
M  +3    -1    core/utilities/maintenance/tools/metaremover/metadataremovetask.cpp
M  +5    -2    core/utilities/maintenance/tools/metasync/metadatasynctask.cpp
M  +3    -1    core/utilities/queuemanager/manager/actionthread.cpp

https://invent.kde.org/graphics/digikam/-/commit/15101d696baf5491abb60be9013fadf3b5dd0b3c
Comment 4 Maik Qualmann 2024-07-28 19:06:48 UTC
Git commit a7ec93df612cdb1a921e40e52794e81364820510 by Maik Qualmann.
Committed on 28/07/2024 at 19:02.
Pushed by mqualmann into branch 'master'.

fix prepare a copied query and handle bind values correctly
Under Qt5 the bind values were a QMap, in Qt6 it is a QVariantList.
If we add a QVariantList we get a list in the list. To change this
behavior we add the bind values one by one.
Related: bug 490484

M  +11   -11   core/libs/database/coredb/coredb.cpp
M  +40   -5    core/libs/database/engine/dbenginebackend.cpp
M  +8    -0    core/libs/database/engine/dbenginesqlquery.cpp
M  +1    -0    core/libs/database/engine/dbenginesqlquery.h
M  +1    -8    core/libs/threads/actionthreadbase.cpp

https://invent.kde.org/graphics/digikam/-/commit/a7ec93df612cdb1a921e40e52794e81364820510
Comment 5 eberhard.morgenroth 2024-07-30 17:31:09 UTC
Thanks.

I turned off "rescan item after writing metadata". This does not solve the problem.

Best,
Eberhard.


-----Original Message-----
From: Maik Qualmann <bugzilla_noreply@kde.org> 
Sent: Sunday, 28 July 2024 11:01
To: Morgenroth, Eberhard <Eberhard.Morgenroth@eawag.ch>
Subject: [digikam] [Bug 490821] digiKam fails to write tags/ratings to image files

This e-mail was sent to you by someone outside Eawag.
You should only click on links or attachments if you are certain that the e-mail is genuine and the content is safe.

https://bugs.kde.org/show_bug.cgi?id=490821

--- Comment #2 from Maik Qualmann <metzpinguin@gmail.com> --- Git commit 341ffaa20f5d37775169d2b86f729c0014bb2fc7 by Maik Qualmann.
Committed on 28/07/2024 at 08:57.
Pushed by mqualmann into branch 'master'.

do not rescan item after writing metadata
Related: bug 490484

M  +2    -2    core/libs/database/engine/dbenginebackend.cpp
M  +3    -14   core/libs/database/utils/ifaces/itemgps.cpp
M  +3    -20   core/libs/fileactionmanager/fileworkeriface.cpp
M  +1    -2    core/libs/properties/captions/itemdescedittab.cpp
M  +1    -2    core/libs/tags/engine/tagmodificationhelper.cpp
M  +1    -8    core/libs/threads/actionthreadbase.cpp
M  +3    -7    core/utilities/facemanagement/database/faceutils.cpp
M  +1    -2    core/utilities/imageeditor/main/imagewindow.cpp
M  +1    -3
core/utilities/maintenance/tools/autotags/autotagsassignmenttask.cpp
M  +1    -3    core/utilities/maintenance/tools/imgqsort/imagequalitytask.cpp
M  +1    -3
core/utilities/maintenance/tools/metaremover/metadataremovetask.cpp
M  +2    -5    core/utilities/maintenance/tools/metasync/metadatasynctask.cpp
M  +1    -3    core/utilities/queuemanager/manager/actionthread.cpp

https://invent.kde.org/graphics/digikam/-/commit/341ffaa20f5d37775169d2b86f729c0014bb2fc7

--
You are receiving this mail because:
You reported the bug.
Comment 6 caulier.gilles 2025-04-11 18:13:54 UTC
Hi,

The 8.7.0 pre-release Windows installer from today have been rebuilt from
scratch with Qt 6.8.3, KDE 6.12, OpenCV 4.11 + CUDA support, Exiv2 0.28.5, ExifTool 13.27, ffmpeg 7, all image codecs updated to last version (jxl, avif, heif, aom, etc.).

Please try with this version to see if your problem still reproducible...

https://files.kde.org/digikam/

Thanks in advance
Best regards

Gilles Caulier