Inconsistency in multi_name, written as "" or " "
When opening a new image in the darkroom, the
multi_name section is written as such in the XMP sidecar:
<darktable:multi_name> <rdf:Seq> <rdf:li/> <rdf:li/> <rdf:li/> </rdf:Seq> </darktable:multi_name>
If the same XMP sidecar is reimported, either by crawler or "load sidecar file" button in the history stack module in the lightroom, the
multi_namesection is then written as
<darktable:multi_name> <rdf:Seq> <rdf:li> </rdf:li> <rdf:li> </rdf:li> <rdf:li> </rdf:li> </rdf:Seq> </darktable:multi_name>
This was tested in darktable 1.6.7.
houz, talking about
multi_name, said in irc that '"" would potentially segfault'.
In current master, source:src/common/exif.cc@b88f80e4#L1856 might be the reason why
" " is used for
multi_name instead of the empty string.
#2 Updated by Tobias Ellinghaus over 4 years ago
- % Done changed from 0 to 20
- Status changed from New to Triaged
A little more background info:
libexiv2 will skip all empty XML tags like
<rdf:li /> when reading the XMP file. Nowadays we don't crash with that any longer since we don't expect the number of multi names to be the same as modules. However, skipping one or more entries that are not at the end of the list (in which case it doesn't really matter) but somewhere in the beginning means that loading the sidecar file will assign the non-empty multi name to the wrong module.
The relevant (unanswered) exiv2 question is http://dev.exiv2.org/boards/3/topics/1729. I already tried mailing the guy directly but never got any answer.
For now we should make sure that the tag is never empty. For the future I already got some ideas for a more robust XMP format (the perils of reading the XMP specs while thinking about better metadata handling) but I definitely don't want to risk anything before we got 2.0 out of the door.