[Digikam-devel] Digikam Crash from Assert in libexiv2

Todd Goodman tsg at bonedaddy.net
Tue May 25 01:17:42 BST 2010


* Todd Goodman <tsg at bonedaddy.net> [100524 19:03]:
> * Andreas Huggel <ahuggel at gmx.net> [100523 05:49]:
> > >> > If anyone has any suggestions for debugging this I'd appreciate it.
> > >>
> > >> The best thing to do is isolating the file causing the crash.
> > >> Is any filename printed on the console, before the debug output you included
> > >> in your mail?
> > >
> > > Hi Marcel,
> > >
> > > No, the filename wasn't printed.  However, I decided to throw an error
> > > before the assert in that case and now it continues the scan (I assume
> > > messing up the already bogus metadata on that file?)
> > 
> > Todd,
> > Can you go back to the version with the assertion and run it with the
> > the patch below. This should output the name of the file (the
> > temporary file actually, but it will be obvious what the original file
> > is).
> > 
> > There appears to be something wrong with the write algorithm in the
> > presence of an image with a corrupted makernote. If you can isolate
> > the image and send it to me I'd like to fix this.
> > 
> > Thanks,
> > Andreas
> > 
> > 
> > 
> > 
> > Index: tiffcomposite_int.hpp
> > ===================================================================
> > --- tiffcomposite_int.hpp       (revision 2226)
> > +++ tiffcomposite_int.hpp       (working copy)
> > @@ -199,7 +199,7 @@
> >          int putb(byte data);
> >          //@}
> > 
> > -    private:
> > +    public:
> >          // DATA
> >          BasicIo& io_;              //! Reference for the IO instance.
> >          const byte* pHeader_;      //! Pointer to the header data.
> > Index: tiffcomposite.cpp
> > ===================================================================
> > --- tiffcomposite.cpp   (revision 2226)
> > +++ tiffcomposite.cpp   (working copy)
> > @@ -1329,6 +1329,7 @@
> >              uint32_t sv = (*i)->size();
> >              if (sv > 4) {
> >                  uint32_t d = (*i)->write(ioWrapper, byteOrder,
> > offset, valueIdx, dataIdx, imageIdx);
> > +                if (sv != d) std::cerr << "---------------> " <<
> > ioWrapper.io_.path() << " <---------------\n";
> >                  assert(sv == d);
> >                  if ((sv & 1) == 1) {
> >                      ioWrapper.putb(0x0);    // Align value to word boundary

Unfortunately only have:

Error: Directory Canon, entry 0x3130 has invalid size 1850671152*1;
skipping entry.
Warning: Directory Canon, entry 0x5265 has unknown Exif (TIFF) type
24933; setting type size 1.
Error: Directory Canon, entry 0x5265 has invalid size 1634026604*1;
skipping entry.
---------------> MemIo <---------------
digikam: /root/digikam-svn/exiv2/src/tiffcomposite.cpp:1334: virtual
uint32_t
Exiv2::Internal::TiffDirectory::doWrite(Exiv2::Internal::IoWrapper&,
Exiv2::ByteOrder, int32_t, uint32_t, uint32_t, uint32_t&): Assertion `sv
== d' failed.
KCrash: Application 'digikam' crashing...
digikam: Fatal IO error: client killed
sock_file=/root/.kde-svn/socket-mail-proxy/kdeinit4_localhost_13
Warning: connect() failed: : No such file or directory
KCrash cannot reach kdeinit, launching directly.




More information about the Digikam-devel mailing list