Bug 201560 - Crash at start up when scanning images
Summary: Crash at start up when scanning images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-26 14:39 UTC by stefan.asserhall
Modified: 2017-07-25 10:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stefan.asserhall 2009-07-26 14:39:35 UTC
Version:           1.0.0-beta4 (rev.: 1002376M) (using 4.3.61 (KDE 4.3.61 (KDE 4.4 >= 20090717)), compiled sources)
Compiler:          gcc
OS:                Linux (i686) release 2.6.26.8-57.fc8

digiKam crashes at start up when scanning images. The crash occurs in the file digikam/libs/database/imagescanner.cpp:378, probably because some image has incorrect metadata. The following patch fixes the crash:

Index: libs/database/imagescanner.cpp
===================================================================
--- libs/database/imagescanner.cpp	(revision 1002376)
+++ libs/database/imagescanner.cpp	(arbetskopia)
@@ -373,13 +373,13 @@
     }
 
     // Headline
-    if (!metadataInfos[0].isNull())
+    if (!metadataInfos[0].isNull() && metadataInfos[0].canConvert(QVariant::String))
     {
         comments.addHeadline(metadataInfos[0].toString());
     }
 
     // Title
-    if (!metadataInfos[1].isNull())
+    if (!metadataInfos[1].isNull() && metadataInfos[1].canConvert(QVariant::String))
     {
         comments.addTitle(metadataInfos[1].toString());
     }
Comment 1 caulier.gilles 2009-07-26 14:46:43 UTC
Marcel,

This one is for you (:=)))

Gilles Caulier
Comment 2 Marcel Wiesweg 2009-07-26 17:40:04 UTC
Can you send me (private email address) the picture causing the crash? The filename is probably the last one printed on the console (from dimg loading or whatever). Thanks!
Comment 3 Marcel Wiesweg 2009-07-27 16:46:59 UTC
Stefan reported this as fixed by private mail