Bug 394736 - XMP file created empty when image is hosted in a Samba share (GVFS)
Summary: XMP file created empty when image is hosted in a Samba share (GVFS)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Xmp (show other bugs)
Version: 5.9.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-27 09:26 UTC by Christophe de Vienne
Modified: 2023-10-29 07:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe de Vienne 2018-05-27 09:26:20 UTC
On a smb mounted photo collection, the .xmp files created by digikam are empty.
I looked at the logs and found some errors, here is a sample of them when digikam saves the metadata on one image (I masked personal info) :


digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> Title:  QMap()
digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> Comment:  QMap()
digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> Pick Label:  0
digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> Color Label:  0
digikam.metaengine: Rating value to write is out of range!
digikam.general: Writting tags
digikam.general: -------------------------- New Keywords ("de Vienne Christophe", "Odile Garnier", "Pris par Nathalie", "75 ans Mamie", "Amillis", "de Vienne Nathalie")
digikam.metaengine: xmlACDSee "<Categories><Category Assigned=\"0\">Personnes<Category Assigned=\"0\">Famille<Category Assigned=\"0\"> [ hidden categories ]"
digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> Read Iptc Keywords:  ()
digikam.metaengine: "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/p4250038.jpg"  ==> New Iptc Keywords:  ( [ hidden keywords ])
digikam.metaengine: MetaEngine::metadataWritingMode 1
digikam.metaengine: Will write XMP sidecar for file "p4250038.jpg"
digikam.general: Detected change, triggering rescan of "/run/user/1000/gvfs/smb-share:server=cachalot,share=photo/2005/album/"
digikam.metaengine: Cannot save metadata to XMP sidecar using Exiv2   (Error # 13 :  Image type 10 is not supported


I had the same issue with digikam 5.6.0 (from the ubuntu repo) and digikam 5.9.0 (from the download page), on a ubuntu 18.04.
Comment 1 Maik Qualmann 2018-05-27 13:53:56 UTC
Strange, the error message states that Exiv2 does not know the type Exiv2::ImageType::xmp. Exiv2 without XMP support? Can you please post the component info from the Help menu? DigiKam from the download page, from www.digikam.org? Did you also test the AppImage?

Maik
Comment 2 caulier.gilles 2018-05-27 14:09:49 UTC
Maik,

Exiv2 XMP support is optional, due to license of XMP SDK from Adobe.

The state of XMP support can be show in Help/Components Info dialog.

The Linux AppImage that we provide with Exiv2 0.26 is compiled, of course, with XMP SDK...

Gilles
Comment 3 Christophe de Vienne 2018-05-27 14:42:43 UTC
I have the issue with the appimage too.

Here is my component informations:

digikam version 5.9.0
CPU cores: 8
Eigen: 3.2.5
Exiv2: 0.26
Exiv2 can write to Jp2: Oui
Exiv2 can write to Jpeg: Oui
Exiv2 can write to Pgf: Oui
Exiv2 can write to Png: Oui
Exiv2 can write to Tiff: Oui
Exiv2 supports XMP metadata: Oui
KF5: 5.42.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 80
LibJasper: 1.900.29
LibLCMS: 2080
LibLqr support: Non
LibPGF: 7.15.32
LibPNG: 1.6.34
LibRaw: 0.18.8
LibTIFF: 4.0.9
Marble: 0.27.20
Parallelized demosaicing: Oui
Qt: 5.9.3
Gestion du lecteur de média: Oui
LibGphoto2: 2.5.16
LibKipi: 5.2.0
LibOpenCV: 3.4.0
LibQtAV: 1.12.0
Modules externes KIPI: 
Moteur de base de données: QSQLITE
Prise en charge de AkonadiContact: non
Prise en charge de Baloo: non
Prise en charge de DBus: Oui
Prise en charge de la galerie HTML: oui
Prise en charge du Calendrier: oui
Prise en charge du Panorama: oui
Comment 4 Christophe de Vienne 2018-05-27 15:09:10 UTC
Note that I have the problem only on the samba share (mounted with gvfs).
On a local collection, the xmp file is properly written.
Comment 5 Maik Qualmann 2018-07-08 18:13:19 UTC
I've found clues on the web that GVFS has probleme with simultaneous reading / writing of files. Possible that Exiv2 files in R/W mode opens.

https://bugreports.qt.io/browse/QTBUG-62096

Maik
Comment 6 caulier.gilles 2020-08-04 08:15:21 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 7 caulier.gilles 2023-05-01 03:31:40 UTC
@Christophe

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 8 caulier.gilles 2023-05-20 06:40:16 UTC
Maik, 

Perhaps with Exiv2 0.28 this problem will disappear...

@Christophe de Vienne 

digiKam 8.1.0 pre-release AppImage bundle is now ported to Exiv2 0.28 which come with a huge list of bugfixes :

https://github.com/Exiv2/exiv2/issues/2406#issuecomment-1529139799

AppImage file is available here :

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

How to use AppImage under Linux :

https://docs.digikam.org/en/getting_started/installation.html#digikam-on-linux

Thanks in advance for your feedback

Gilles Caulier
Comment 9 caulier.gilles 2023-10-12 05:41:33 UTC
Christophe,

What's about this file using current 8.2.0 AppImage Linux bundle ? It's
reproducible ?

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

Note: bundle is now based on Qt 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 10 Maik Qualmann 2023-10-29 07:44:28 UTC
Git commit 7f900c7221e3c7977369527b21f56261614a95e1 by Maik Qualmann.
Committed on 29/10/2023 at 08:41.
Pushed by mqualmann into branch 'master'.

use QIODevice to read and write files with Exiv2
Related: bug 338462, bug 446363, bug 398582
FIXED-IN: 8.2.0

M  +3    -3    NEWS
M  +14   -8    core/libs/metadataengine/engine/metaengine_comments.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_exif.cpp
M  +28   -18   core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_iptc.cpp
M  +112  -43   core/libs/metadataengine/engine/metaengine_p.cpp
M  +14   -8    core/libs/metadataengine/engine/metaengine_previews.cpp
M  +15   -8    core/libs/metadataengine/engine/metaengine_xmp.cpp

https://invent.kde.org/graphics/digikam/-/commit/7f900c7221e3c7977369527b21f56261614a95e1