[Digikam-devel] Digikam Crash from Assert in libexiv2

Andreas Huggel ahuggel at gmx.net
Sun May 23 11:06:22 BST 2010


>> > 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



More information about the Digikam-devel mailing list