exiv2 fails to read XMP metadata when duplicates present

Bug #1662864 reported by Andreas E. on 2017-02-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
exiv2 (Ubuntu)
Undecided
Unassigned

Bug Description

When reading XMP metadata from image files, exiv2 (and gexiv2) give sometimes no output, although metadata are present. This is the case when duplicate tags are present.

While dulicate tags are incorrect and inconsistent, we can not blame some software that did not properly write XMP data, because in real-world scenarios, users DO have image files with duplicate tags, and these files DO contain metadata.

Observation:

$ exiv2 -px example_duplicate_tags.jpg
Error: XMP Toolkit error 203: Duplicate property or field node
Warning: Failed to decode XMP metadata.
example_duplicate_tags.jpg: (No XMP data found in the file)

By contrast, `exiftool example_duplicate_tags.jpg` prints all metadata and ignores duplicates.

Expectation:

exiv2 should give access to all readable tags. If some XMP tags are inconsistent, it should only be indicated by a warning but not a denial of operation. In case of duplicates the question is open whether to return the last occuring value or the first.

Ubuntu 16.10
exiv2 0.25-3
libexiv2-14 0.25-3

Andreas E. (andreas-e) on 2017-02-08
summary: - exiv2 fails to read xml metadata when duplicates present
+ exiv2 fails to read XMP metadata when duplicates present
Andreas E. (andreas-e) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers