[Digikam-devel] [digikam] [Bug 339811] New: Crash occurring when browsing my images, resolved issue to thumbnailcreator.cpp KExiv2Iface::KExiv2Previews trying to access non-present preview

Pierre Dumuid pmdumuid at gmail.com
Thu Oct 9 12:21:55 BST 2014


https://bugs.kde.org/show_bug.cgi?id=339811

            Bug ID: 339811
           Summary: Crash occurring when browsing my images, resolved
                    issue to thumbnailcreator.cpp
                    KExiv2Iface::KExiv2Previews trying to access
                    non-present preview
           Product: digikam
           Version: 4.3.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: Thumbnails
          Assignee: digikam-devel at kde.org
          Reporter: pmdumuid at gmail.com

I recently was browsing my images, and came across a folder where suddenly
digikam crashed.

After running digikam through kdbg, I resolved that the problem was that a
preview image was being attempted to be retrieved when one didn't exist! 
Unfortunately, KExiv2Iface::KExiv2Previews doesn't throw an exception when the
index passed to the call to image() exceeds the number of previews present.

 in the following file:
digikam-4.3.0/core/libs/threadimageio/thumbnailcreator.cpp

--- ./digikam-4.3.0/core/libs/threadimageio/thumbnailcreator.cpp       
2014-09-11 23:38:57.000000000 +0930
+++ /tmp/digikam-4.3.0--core-libs-threadimageio-thumbnailcreator.cpp   
2014-10-09 21:41:18.346518663 +1030
@@ -525,7 +525,9 @@
             kDebug() << "Trying to load Embedded preview with Exiv2";

             KExiv2Iface::KExiv2Previews preview(path);
-            qimage = preview.image();
+            if (preview.count() > 0) {
+                qimage = preview.image();
+            }
         }

Before this change, browsing the specific folder crashed digikam everytime. 
After the above change, I haven't had it crash..


Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list