[Digikam-devel] Digikam Crash from Assert in libexiv2
Todd Goodman
tsg at bonedaddy.net
Tue May 25 00:00:47 BST 2010
* 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
Hi Andreas,
Thanks very much. I'm running with this change and hopefully will find
the file causing the problem.
Sorry for the late reply!
Regards,
Todd
More information about the Digikam-devel
mailing list