exiv2 version 0.18 crashes / also crashes digikam / fixed in 0.18.1

Bug #358576 reported by Vlado Plaga
60
This bug affects 6 people
Affects Status Importance Assigned to Milestone
digiKam
Invalid
Undecided
Unassigned
exiv2 (Ubuntu)
Fix Released
Medium
Luka Renko

Bug Description

Binary package hint: exiv2

Digikam in Jaunty (Ubuntu 9.04 beta) crashes because of some of my pictures. I could track the problem to exiv2.

To reproduce:

# wget http://vlado-do.de/crash_exiv2_0.18.jpg

# exiv2 ex crash_exiv2_0.18.jpg

output:

"exiv2: tiffcomposite.cpp:697: virtual uint32_t Exiv2::Internal::TiffMnEntry::doCount() const: Assertion `tiffType() == ttUndefined' failed.
Aborted (core dumped)"

exiv2 0.17 in Ubuntu 8.10 does not have this problem, neither does exiv2 0.18.1 (which I compiled from source).

Related branches

Revision history for this message
Niklas Trautwein (jniklast) wrote :

i can confirm this. it's really annoying since it makes digikam unusable.

Revision history for this message
Christian Heimes (heimes) wrote :

I've run into the same issue with digikam, too. Please update exiv2 as soon as possible.

Revision history for this message
Luka Renko (lure) wrote :

Problem might be that exiv2 0.18.1 does not look like bug-fix only release according to changelog:
http://www.exiv2.org/changelog.html

This bug is confirmed fix in 0.18.1, according to Mandriva bug:
https://qa.mandriva.com/show_bug.cgi?id=49492

Revision history for this message
Luka Renko (lure) wrote :

Closed digikam task, as this is confirmed bug in exiv2

Changed in digikam:
status: New → Invalid
Changed in exiv2 (Ubuntu):
assignee: nobody → Luka Renko (lure)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Luka Renko (lure) wrote :

I have prepared test packages for new bug-fix release of exiv2 0.18.1. Packages are available in my PPA:
https://launchpad.net/~lure/+archive/ppa

I would like to ask all reporters to install these test packages and report back if these packages fixes the problem for you.
As this is new upstream release, it would be also good to perform some random testing of Exif/IPTC/XMP functionality in your favorite photo application (digikam, krita, gwenview, kphotoalbum, hugin, ufraw...) and report back which application you have tried and if you have observed any new problem (regression) with this new version.

Changed in exiv2 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Lowell Alleman (lowell-alleman) wrote :

I'm confirming that the PPA package for exiv2 0.18.1 fixes the crash in DigiKam on my system. I've also fired up Gwenview (which didn't seem to crash on the image in question with either version of exiv2) and it seems to still be working fine. Thanks Luka!

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

I can confirm it too :)

Revision history for this message
Luka Renko (lure) wrote :

I would like to ask Release Team if such bug-fix upstream updated would be acceptable just after RC of Jaunty.
I have put 9.04 milestone to get it on radar screen, but if not acceptable, remove it.

Changed in exiv2 (Ubuntu):
milestone: none → ubuntu-9.04
Revision history for this message
Luka Renko (lure) wrote :

User from duplicate bug 363164 also confirmed that new version also fixes crash on TIFF file (with different stack trace).

Revision history for this message
Luka Renko (lure) wrote :

Upstream ChangLog:

Changes from version 0.18 to 0.18.1
-----------------------------------

* Utilities
 - 0000612: Failed to delete XMP data from NEF (or any other TIFF-based)
            images. (Reported by Martin Eriksson)
 - 0000602: Exiv2 generated TIFF incompatible with libtiff.
            (Reported by Udi Fuchs)
          - Added new "organize" tool (Brad Schick).

* Exiv2 library
 - 0000623: Remove TiffPrinter visitor.
 - 0000622: Exiv2 doesn't parse MicrosoftPhoto schema prefix correctly.
            (Reported by Gilles Caulier / Sylvain Crouzillat)
 - 0000619: Segfault when opening PNG image.
            (Reported with patch by Lukasz Krzyzak)
 - 0000618: Easy access to information which may be in different Exif tags.
            (Based on a patch from Carsten Pfeiffer)
 - 0000615: Setting the Exif makernote tag aborts if type is not
            "undefined". (digiKam bug 182738)
 - 0000609: Building a DLL of Exiv2 0.18 in MinGW requires -no-undefined
            linker flag. (Reported with solution by Giuseppe Rota)
 - 0000606: Add write support for Photoshop PSD image format.
            (Patch from Michael Ulbrich)
 - 0000604: Nikkor lens on Nikon D90 not recognized.
            (Reported by Niels Kristian Bech Jensen)
 - 0000603: Exiv2 does not read lens maker.
            (Reported by Niels Kristian Bech Jensen)
 - 0000594: Modifying images on an NTFS file system fails.
            (digiKam bug 178103)
 - 0000494: Patch for displaying focal length (Exif.Canon.FocalLength).
                   (Patch from Artis Rozentals)
          - Updated Panasonic makernote.
          - Added read-support for Panasonic RW2 raw images.
            (With valuable input from Matthias Welwarsky)
          - Some Nikon makernote updates.
          - Updated Nikon Lens lookup table to v4.0.347.00 of
            Robert Rottmerhusen's lens database.
          - Fixed crash in Pentax makernote pretty-printing code.
            (Reported by Marijn Kampf)
          - Refactored TiffCreator: simplified, fixed several todo's, added
            support for multiple TIFF tree structures.

* MSVC related
 - 0000621: windows librarys are forcing a link to
            ..\..\..\zlib-1.2.3\projects\visual6\blah\blah.
                   (Reported by Peter J. Ersts, fix by Robin Mills)

Revision history for this message
Luka Renko (lure) wrote :

Package was uploaded to Jaunty by Anthony Mercatante and is pending archive admin approval. Crossing fingers...

Luka Renko (lure)
Changed in exiv2 (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Sorry, rejecting the exiv2 upload; the new upstream version changes too much to be an acceptable fix for this issue so close to release.

If you can provide a targeted fix before Monday, we can evaluate that; otherwise this will need to go via SRU.

Changed in exiv2 (Ubuntu):
milestone: ubuntu-9.04 → none
status: Fix Committed → Triaged
Revision history for this message
Luka Renko (lure) wrote :

This is very unfortunate. :-(
Problem is that Tiff parsing code (which is also used for various RAW files) was refactored so it is very hard for me to pull out exact fixes for crashes various users are experiencing.

Which changes are considered bigger risk for regression? Most of the changes are bug fixes (including several crashes). In terms of new functionality, there is new command line mode: organize (note that command line is not primary interface for libexiv2), new Nikon lens database (just table updated), translations (are they problematic for rosetta import or similar?) and build files for MSVC++.

I would also like to note that exiv2 is only used by KDE applications in main (gwenview, digikam, kipi-plugins) and I do not see any GNOME/main apps dependency (so I think it is not even on Ubuntu CD). Without fixes, Kubuntu users using photo applications will have very unstable experience with Jaunty. :-(

Anyway, I leave it Kubuntu core-dev's and Jonathan Riddell to drive this further. I will just use PPA for the time being.

Revision history for this message
Vlado Plaga (vlado-gmx) wrote :

I just notified the exiv2 author Andreas Huggel of this problem. Maybe he can provide a bugfix that does not add new functionality. Of course we can't demand that, if there already is a version without the problem - the distributors have to take care of the situation.

By the way: for me the limitations due to the buggy exiv2 0.18 are marginal, since only the 10 or so pictures taken with a specific camera (which was a friend's model, not mine) cause the program to crash. So I just moved them out of the digikam folder. Of course the situation looks different for anyone who owns such a digital camera.

Still this regression is unfortunate: digikam (and exiv2) in Ubuntu 08.10 had no problems with the very same pictures.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Vlado
Thanks a lot for your concern. A smaller fix has already been uploaded and is awaiting approval; I'm attaching it here for reference.

A test-build with the fixes can be found in my PPA:
https://launchpad.net/~andreas-wenning/+archive/experimental

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package exiv2 - 0.18-1ubuntu1

---------------
exiv2 (0.18-1ubuntu1) jaunty; urgency=low

  * Fix count of makernote tag; caused crashes with with certain files. Patch
    taken from upstream svn; applied inline. (LP: #358576)
    - http://dev.exiv2.org/repositories/revision/exiv2/1743
    - Modifies:
      + src/tiffcomposite.cpp
  * Check for empty buffer before read; caused crashes with some png files.
    Patch taken from upstream svn; applied inline.
    - http://dev.exiv2.org/repositories/revision/exiv2/1763
    - Modifies:
      + src/pngchunk.cpp

 -- Andreas Wenning <email address hidden> Sun, 19 Apr 2009 16:34:23 +0200

Changed in exiv2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Vlado Plaga (vlado-gmx) wrote :

@Andreas W
Thank you for supplying the patch! I just updated my system, and now I can once again see all of my pictures in digikam.

Anyway, for the record, I'll post the detailed reply Andreas H. sent me (and allowed me to post here). He favours inclusion of the new version, but I also think it is better to release Ubuntu 9.04 with the binary compatible patch only, so that digikam and other programs don't have to be recompiled/updated as well.

Andreas H's reply to my e-mail:

Identifying the changes is not difficult in most cases: Go to the changelog (http://www.exiv2.org/changelog.html), follow the link to the issue of interest and from there to the revision(s) with the fix (there is a link on the "view differences" page for a patch). The more tricky part is to decide if a patch works and has no side effects when applied to a specific target version.

The following two patches seem to be in demand, from what I can tell
(https://bugs.kde.org/show_bug.cgi?id=190045#c2):
http://dev.exiv2.org/repositories/diff/exiv2?format=diff&rev=1743
(fixes bug http://dev.exiv2.org/issues/show/615) and
http://dev.exiv2.org/repositories/diff/exiv2?format=diff&rev=1752

Having said this, 0.18.1 was intended to be binary compatible release but unfortunately it turned out only "almost binary compatible" with 0.18; "almost" due to an oversight: http://dev.exiv2.org/boards/3/topics/show/133
The new organize tool is an additional application in a new directory of the distribution, which is not even built if you don't perform extra steps. It can just be ignored. In my opinion it is better to use 0.18.1 than attempting to patch
0.18. But of course it is up to each distro to decide what is best for them. They all have their own priorities and constraints.

Revision history for this message
wolfger (wolfger) wrote :

I have a problem with Digikam crashing every time I try to build a fingerprint database. I think it's the same problem, or related. Attaching the kcrash file here.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@wolfger
This does not look to be related to any of the known crash-problems with 0.18.0 (we got to deal with all of the read-crashes, but might have missed a write-crash though).

Please make a new bug report and add the crash output and all relevant info to it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.