broken xmp files

Phil philtuckey at free.fr
Mon Oct 23 05:58:45 BST 2017


On 22/10/17 16:18, Dan McDaniel wrote:
> Thanks for the detailed comments on this problem. Yes, I'm working on a
> Mac, a Macbook Pro to be exact. I'm traveling at the moment and thus
> away from my Linux desktop.
> 
> I went back through my albums, did a "select all" and then a "write
> metadata to selected". In some cases it took multiple tries before it
> actually wrote out complete sidecar files. In one case that I happened
> to notice, it wrote correctly to the problem sidecars, but broke others
> that had previously been OK.

Yes this is a "normal" manifestation of the bug. Each time you write 
metadata to a given selection of images, a different subset of them has 
the problem. (You can see this easily in the file browser (Finder) with 
sorting by size, the broken sidecars rise to the top of the list.) The 
only reliable way I have found to fix them is by writing the bad 
images/sidecars one-by-one.

> The above was done using 5.8.0 beta as it was suggested that the problem
> may have been corrected in that version.
> 
> What are you using for your VM? I may have to try that approach.

I use VirtualBox and the most recent Ubuntu LTS. Note that there have 
been some comments on the list about incompatibilities of dk with Unity 
desktop. Gilles himself uses Mageia.

Philip

> 
> Dan
> 
> On Sun 22.Oct.17 11:28, Phil wrote:
>> There is a long-standing bug concerning simultaneous tagging of 
>> multiple images under OS X/macOS:
>>
>> https://bugs.kde.org/show_bug.cgi?id=372650
>>
>> The metadata write fails for a small number of images, apparently 
>> randomly-chosen among all the images. This affects both writing tags 
>> to the image files and writing sidecars. (The bug report is from 2016 
>> but I noticed this and wrote to the list about it years ago.)
>>
>> I gave quite a lot of details in the bug report, so that should help 
>> to decide if you have met the same problem.
>>
>> In particular, are you working on a Mac?
>>
>> I note that you said the problem affects half of your 1000 images, 
>> whereas I usually see only a few %. But my tests use about a 100 
>> images, perhaps the problem becomes proportionally worse as the number 
>> of images increases.
>>
>> Gilles Caulier believes the problem is due to the Exiv2 library. As I 
>> commented in the bug report, I do not think the evidence proves this, 
>> it could also be a problem in the digiKam data structures or calls to 
>> Exiv2 (specific to Mac).
>>
>> Like you, I commonly tag multiple files simultaneously, for example 
>> when I load all the images from an event and want to give them all the 
>> same caption and some keywords.
>>
>> I have never met this problem on linux. Therefore to avoid it, I do my 
>> tagging in dk running under a linux virtual machine. I share the image 
>> files and dk databases from macOS to the VM, so I can run dk both in 
>> the VM and in native (not at the same time!). In practice this is not 
>> completely comfortable, and I tend not to use dk in native for 
>> anything other than viewing (not even tagging or editing individual 
>> images).
>>
>> For your information, you can repair the incomplete sidecars or image 
>> file tags by writing them out individually, i.e. by selecting the 
>> image and then using
>> Item -> Write Metadata to Image
>> since the bug never seems to occur when dealing with individual 
>> images. Apart from the tediousness of remembering to do this every 
>> time one tags multiple images, I have never completely convinced 
>> myself that the resulting sidecars or image files are identical to 
>> what they would have been without the bug.
>>
>> To rewrite the sidecars (or image file tags) for multiple images you 
>> can select them all and use the above, or for a complete album use
>> Album -> Write Metadata to Image
>> but in both cases the bug will occur again.
>>
>> Philip
>>
>> On 22/10/17 04:35, Dan McDaniel wrote:
>>> Thanks. I'll give that a try. Is there a way to force it to re-write all
>>> the xmp files?
>>>
>>>
>>> On Sat 21.Oct.17 19:41, Andrey Goreev wrote:
>>>> I think Maik might already fixed this. I do recall having a similar 
>>>> conversation a couple of months ago.Have you tried pre-release 
>>>> bundle ver. 5.8.0 ?
>>>>
>>>> Sent from my Samsung Galaxy smartphone.
>>>> -------- Original message --------From: Dan McDaniel <dan at dm3.us> 
>>>> Date: 2017-10-21  7:34 PM  (GMT-07:00) To: digikam-users at kde.org 
>>>> Subject: broken xmp files
>>>>
>>>> I'm using 5.7.0 on a Mac.
>>>>
>>>> I used Digikam to tag and rate about 1000 images, a combination of 
>>>> jpegs
>>>> and raws. For about half of them Digikam didn't write a complete xmp
>>>> file, but only the first line:
>>>>
>>>>   <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
>>>>
>>>> On some of them I tried going back into DK and changing the star 
>>>> rating.
>>>> This caused it to write out the xmp file including the rating. But it
>>>> didn't write the tags. To get DK to write the tags I had to make a
>>>> change to a tag. Then to get it to write the title you have to make a
>>>> change to the title and so on. Basically, you have to remove stars,
>>>> tags, titles, and everything and add them back in to force DK to write
>>>> them out to the xmp file.
>>>>
>>>> I hope that this can be fixed because as-is DK isn't very useful to me.
>>>>
>>>>
>>>> -- 
>>>> Dan McDaniel



More information about the Digikam-users mailing list