Bug 366247 - Digikam writes metadata to some files only not every one
Summary: Digikam writes metadata to some files only not every one
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Maintenance-Database (show other bugs)
Version: 5.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-29 15:41 UTC by Andrius
Modified: 2017-03-09 11:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius 2016-07-29 15:41:02 UTC
I have a folder with 60 JPGs,
none of them are read only;
all of them are full access for all users in NTFS properties;
every single picture has a tag.

However,
if I sync the metadata to images, I can see that only 23 pictures have tags written to the metadata, the rest have a sidecar file (xmp)

Reproducible: Sometimes

Steps to Reproduce:
1. Add tags to multiple images in digikam
2. Write metadata to images
3. Open windows file explorer, go to file properties - details - tags


Actual Results:  
Some images have tags, some don't

Expected Results:  
Every image you add a tag in digikam to should have a tag in file properties 

I think the malfunction happens not every time. I did not check every single file in other folders but I took a quick look at they seem to be fine.
Star ratings have been written to metadata without errors.
All starred images have tags written to metadata.
All pictures with faces detected have tags written to metadata.
The bug might be related to Bug 361378 - Tags are not being removed from files metadata
I tried to switch the lazy synchronization on and off but the result is the same.
I tried to remove one tag and add it again but the result is the same.
Comment 1 caulier.gilles 2016-07-29 15:48:38 UTC
Using single core to process image give better results ?

>Open windows file explorer, go to file properties - details - tags

And you expect to see Windows explorer to give right metadata ?
You must check on image metadata as well. Look in XMP metadata tags viever in digiKam or Showfoto for details (do not use tags filter here).

Gilles Caulier
Comment 2 Andrius 2016-07-29 15:51:15 UTC
Here is a screenshot of the folder in windows file explorer.
https://goo.gl/photos/Qpzono8Jh5FxVC4d8
Every single file is supposed to have a tag "zoo". 

I wish I could show tags as a column in digikam table view. You would see the difference between file explorer and digikam side by side then.
Comment 3 Andrius 2016-07-29 15:59:23 UTC
(In reply to caulier.gilles from comment #1)
> Using single core to process image give better results ?
> 

I am not sure I understood you fully. 
Digikam is not asking you whether to use all processor cores or work on a single core when you click on "sync" icon in thumbbar or select all files, go to "item" menu then "write metadata to selected images" .
There is a checkbox for it in the menu "tools" - "maintenance" but digikam usually crashes on my computer if I check the box so I stopped using it and normally leave it unchecked.
Comment 4 Andrius 2016-07-29 16:07:49 UTC
(In reply to caulier.gilles from comment #1)

> >Open windows file explorer, go to file properties - details - tags
> 
> And you expect to see Windows explorer to give right metadata ?

Since windows explorer reads metadata I am expecting to see there the tags I added in digikam

> You must check on image metadata as well. Look in XMP metadata tags viever
> in digiKam or Showfoto for details (do not use tags filter here).
> 
> Gilles Caulier

Could you walk me through on what should I do here please. I have never heard of "XMP metadata tags viewer" and never used "showfoto" either. I did open the last one though but I could not figure out how to make it showing tags
Comment 5 Andrius 2016-08-04 23:04:11 UTC
I just looked at other folders in my collection and the result is the same - only some files have tags actually saved in metadata. Major feature is broken now for me.
Comment 6 Andrius 2016-08-05 16:56:09 UTC
I have played with the files for a while and here is what I have noticed.
- digikam is unable to save any metadata to some certain images. I have tried both digikam 4.14 in linux and 5.0.0 in windows. I have tried to play with NTFS security settings for the files. I have tried adding / removing tags, ratings, captions, titles, etc.
nothing worked...

but

as soon as I opened the same folder/file in picasa and added a tag, e.g. "test" digikam got back the ability to save changes into the file. So when I clicked on "write metadata to file" it deleted the "test" tag added in picasa and wrote tags, ratings, captions, etc. that are in digikam database.

another thing

when I do all the same but not in picasa but in file properties in windows file explorer the result is very similar but digikam can't delete the tag "test" assigned in the file explorer. Digikam will add other tags, ratings, captions, etc. and it will react on changes but it won't touch the tag "test". The only way to delete it is to do so in file explorer.

Getting frustrated now. I guess I should try storing my pictures in a different file system but I am afraid to lose the data. Or maybe I should try doing DAM on a proper linux machine but again I am afraid to lose the data plus not everything I normally do with my files can be done in linux
Comment 7 Maik Qualmann 2016-08-09 17:59:33 UTC
Here not to reproduce with a Windows VM and a real Windows machine. If you are using an antivirus program, you can disable it for testing?

Maik
Comment 8 caulier.gilles 2016-11-28 14:00:00 UTC
Widcowboy,

any feedback on this entry ?

Gilles Caulier
Comment 9 caulier.gilles 2016-12-29 11:30:48 UTC
Can you reproduce the problem with 5.4.0-pre release installer for Windows,
available here :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 10 Andrius 2016-12-30 21:09:13 UTC
(In reply to caulier.gilles from comment #9)
> Can you reproduce the problem with 5.4.0-pre release installer for Windows,
> available here :
> 
> https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> 
> Gilles Caulier

Gilles,
I just checked the last version on 3 different folders and the issue did not appear. By the way, I am pretty sure I used to get keywords like "Events|holiday" written in metadata but now I am seeing only "holiday". Is there a setting in digikam for that? Could it make a difference?
Comment 11 caulier.gilles 2016-12-30 21:34:08 UTC
There is no settings for that, but with current 5.4.0 pre release, we use last Exiv2 0.26-svn shared library which is not released and introduce more than 200 bugfixes. This can explain the difference. Exiv2 is the low level library used to play with metadata (xmp sidecar files included).

Gilles Caulier
Comment 12 caulier.gilles 2016-12-31 11:56:52 UTC
So can we considerate as fixed using Exiv2 0.26-svn ?

Gilles Caulier
Comment 13 Andrius 2017-01-01 19:11:18 UTC
(In reply to caulier.gilles from comment #12)
> So can we considerate as fixed using Exiv2 0.26-svn ?
> 
> Gilles Caulier

I think so. If the issue occurs again I will let you know.
Comment 14 Andrius 2017-03-09 11:20:59 UTC
I just found out that this bug still exists.
I have been sorting pictures using Geeqie and noticed that some pictures I facetagged in digiKam do not have keywords. Sure enough when I opened same images in digiKam the People tag showed up in the Tags tree but not in Edit Metadata menu (Ctrl-Shift-M)
Latest 5.5 appimage on Linux Mint 18.1