Bug 144574

Summary: digiKam crashes every time it scans collection
Product: [Applications] digikam Reporter: Aaron D. Campbell <kdebugs>
Component: Metadata-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: ahuggel, caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 7.3.0
Sentry Crash Report:
Attachments: Console output of digikam
strace of crash

Description Aaron D. Campbell 2007-04-23 18:18:16 UTC
Version:           0.9.1-1ubuntu4 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

Every time I start digiKam, it scans my collection and crashes.  My collection *is* large about 7930 files and 19G.  It used to be on a Windows Box, so there might be some database files or something, but none that I saw.

Backtrace:
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1246632240 (LWP 21853)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb5b85df0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb5b87641 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb5d7d270 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#10 0xb5d7aca5 in ?? () from /usr/lib/libstdc++.so.6
#11 0xb5d7ace2 in std::terminate () from /usr/lib/libstdc++.so.6
#12 0xb5d7ae1a in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0xb5d11e3f in std::__throw_length_error () from /usr/lib/libstdc++.so.6
#14 0xb5d56a2a in std::string::_Rep::_S_create () from /usr/lib/libstdc++.so.6
#15 0xb5d57825 in ?? () from /usr/lib/libstdc++.so.6
#16 0xb5d57921 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#17 0xb745606e in Exiv2::StringValueBase::read ()
   from /usr/lib/libexiv2-0.12.so
#18 0xb740601e in Exiv2::Exifdatum::setValue () from /usr/lib/libexiv2-0.12.so
#19 0xb7406100 in Exiv2::Exifdatum::Exifdatum ()
   from /usr/lib/libexiv2-0.12.so
#20 0xb740a934 in Exiv2::ExifData::add () from /usr/lib/libexiv2-0.12.so
#21 0xb740af20 in Exiv2::ExifData::load () from /usr/lib/libexiv2-0.12.so
#22 0xb74202f5 in Exiv2::JpegBase::readMetadata ()
   from /usr/lib/libexiv2-0.12.so
#23 0xb749c7cb in KExiv2Iface::KExiv2::load () from /usr/lib/libkexiv2.so.0
#24 0xb7f1b85c in Digikam::DMetadata::load () from /usr/lib/libdigikam.so.0
#25 0xb7f1b8cc in Digikam::DMetadata::DMetadata ()
   from /usr/lib/libdigikam.so.0
#26 0xb7d67e88 in Digikam::ScanLib::storeItemInDatabase ()
   from /usr/lib/libdigikam.so.0
#27 0xb7d7a978 in Digikam::ScanLib::allFiles () from /usr/lib/libdigikam.so.0
#28 0xb7d7a926 in Digikam::ScanLib::allFiles () from /usr/lib/libdigikam.so.0
#29 0xb7d7a926 in Digikam::ScanLib::allFiles () from /usr/lib/libdigikam.so.0
#30 0xb7d7b1b9 in Digikam::ScanLib::findMissingItems ()
   from /usr/lib/libdigikam.so.0
#31 0xb7d7b44f in Digikam::ScanLib::startScan () from /usr/lib/libdigikam.so.0
#32 0xb7d96337 in Digikam::AlbumManager::setLibraryPath ()
   from /usr/lib/libdigikam.so.0
#33 0x0804ab79 in main ()
Comment 1 Aaron D. Campbell 2007-04-23 18:25:18 UTC
Created attachment 20363 [details]
Console output of digikam
Comment 2 Aaron D. Campbell 2007-04-23 18:35:14 UTC
Created attachment 20364 [details]
strace of crash

It was too large to upload, so I bzip'd it
Comment 3 Dennis Gnad 2007-04-23 19:46:58 UTC
Same issue here, same libexiv2 and libkexiv2 etc. errors in the backtrace
Comment 4 caulier.gilles 2007-04-23 19:58:08 UTC
You use an old Exiv2 release. This problem have already reported in this room before.

Please update Exiv2 to last stable 0.14 

http://www.exiv2.org

and libkexiv2 to 0.1.2

http://www.kipi-plugins.org

Gilles Caulier
Comment 5 Dennis Gnad 2007-04-23 20:39:35 UTC
I already have these versions, but the problem is still there
Comment 6 caulier.gilles 2007-04-24 09:20:21 UTC
Dennis, it can be a different problem for you. I'm sure than to use the old Exiv2 0.1.2 and libkexiv2 0.1.1 can crash digiKam in special case. Using at least Exiv2 0.1.3 (0.1.4 recommended) and libkexiv2 0.1.2 is always better.

If you have identified with picture crash digKam during startup, attach it in this B.K.O file. Thanks in advance

Gilles


Comment 7 Aaron D. Campbell 2007-04-24 23:46:12 UTC
It seems I can't upload a big enough file, so here is the explanation, and the link (also not sure how to link on here):
It seems that any of these 3 pictures will cause the crash.  They also seems to be able to crash Konqueror if you open them in it.
<a href="http://xavisys.com/temp/pics.tar.bz2">http://xavisys.com/temp/pics.tar.bz2</a>
http://xavisys.com/temp/pics.tar.bz2
Comment 8 caulier.gilles 2007-04-25 08:56:21 UTC
thanks Aaron,

I'm currenty out of town during one week. No speed internet connection here (just RTC). I'm back in one week. So please, lets the files online until next wednesday or post these files like atachements on this bugzilla file.

Also, please try to update Exiv2 and libkexiv2 on your computer

Thanks in advance

Gilles Caulier
Comment 9 Aaron D. Campbell 2007-04-25 16:29:25 UTC
I don't mind leaving it there for you, but I can't upload it.  It's too large.  Even when I bzip the images one at a time, only one gets small enough to upload here (1M is the limit for non-patches).  The upload prompts suggest that I re-save the pics with better JPEG compression (or some other format), but that would ruin the whole point.
Comment 10 Marcel Wiesweg 2007-04-25 19:36:30 UTC
I can confirm. Sounds like a problem for Andreas.
Console output:
Warning: Makernote tag 0x4702 has invalid Exif type 20226; using 7 (undefined).
Warning: Makernote tag 0xe101 has invalid Exif type 4354; using 7 (undefined).
Warning: Makernote tag 0x0e02 has invalid Exif type 60417; using 7 (undefined).
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create

Backtrace:
#4  0xb5d1d841 in raise () from /lib/libc.so.6
#5  0xb5d1eed9 in abort () from /lib/libc.so.6
#6  0xb5eef714 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#7  0xb5eed105 in std::set_unexpected () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#8  0xb5eed142 in std::terminate () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#9  0xb5eed27a in __cxa_throw () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#10 0xb5e82a2f in std::__throw_length_error () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#11 0xb5ec79a6 in std::string::_Rep::_S_create () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#12 0xb5ec8b45 in std::string::_S_copy_chars () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#13 0xb5ec8c21 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
   from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6
#14 0xb751eeae in Exiv2::StringValueBase::read (this=0x8191f90, buf=0x6 <Address 0x6 out of bounds>, len=-184483838) at value.cpp:196
#15 0xb74c2d98 in Exiv2::Exifdatum::setValue (this=0xbfb26880, e=@0x81952f0, byteOrder=Exiv2::littleEndian) at exif.cpp:193
#16 0xb74c2e80 in Exifdatum (this=0xbfb26880, e=@0x81952f0, byteOrder=<value optimized out>) at exif.cpp:97
#17 0xb74c7463 in Exiv2::ExifData::add (this=0x8184080, begin={_M_current = 0x8195138}, end={_M_current = 0x8195348},
    byteOrder=Exiv2::littleEndian) at exif.cpp:767
#18 0xb74c7a3a in Exiv2::ExifData::load (this=0x8184080, buf=0x8198310 "II*", len=6161) at exif.cpp:593
#19 0xb74df65e in Exiv2::JpegBase::readMetadata (this=0x8184078) at jpgimage.cpp:248
#20 0xb7572c5f in KExiv2Iface::KExiv2::load (this=0xbfb26afc, filePath=@0xbfb26b0c) at kexiv2.cpp:355
#21 0xb7e1b4bc in Digikam::DMetadata::load (this=0xbfb26afc, filePath=@0xbfb26b0c) at dmetadata.cpp:61
#22 0xb7e1b58c in DMetadata (this=0xbfb26afc, filePath=@0xbfb26b0c) at dmetadata.cpp:49
#23 0xb7d17b96 in Digikam::ScanLib::storeItemInDatabase (this=0xbfb26f9c, albumURL=@0xbfb26c1c, filename=@0xbfb26c3c, albumID=59)
    at scanlib.cpp:408
#24 0xb7d18000 in Digikam::ScanLib::allFiles (this=0xbfb26f9c, directory=@0xbfb26d78) at scanlib.cpp:367
#25 0xb7d180c2 in Digikam::ScanLib::allFiles (this=0xbfb26f9c, directory=@0xbfb26e28) at scanlib.cpp:372
#26 0xb7d18e99 in Digikam::ScanLib::findMissingItems (this=0xbfb26f9c) at scanlib.cpp:207
#27 0xb7d194f4 in Digikam::ScanLib::startScan (this=0xbfb26f9c) at scanlib.cpp:100
#28 0xb7cdc393 in Digikam::AlbumManager::setLibraryPath (this=0x80cb840, path=@0xbfb27158) at albummanager.cpp:289
#29 0x0804a98b in main (argc=1, argv=0xbfb272d4) at main.cpp:287
Comment 11 caulier.gilles 2007-04-26 07:35:13 UTC
Andreas,

Can you take a look to the backtrace reported by Marcel using images from Aaron ?

Thanks in advance

Gilles

PS : Marcel, witch Exiv2 release you use ?
Comment 12 Andreas Huggel 2007-04-26 14:06:39 UTC
Yes, I can reproduce the problem with the images posted by Aaron. I've opened a bug for exiv2:

http://dev.robotbattle.com/bugs/view.php?id=513

The images are from a SONY MVC-CD500 camera and have a Sony Makernote which seems to be the culprit. 

Dennis, can you also identify the images which cause the crash on your PC? If so, please post a sample as well.

Generally, a quick check to see if a problem is caused by libexiv2 is to try the exiv2 command line tool. If you can reproduce the problem with that alone, it's an exiv2 bug. In this case, a simple exiv2 -pt DSC01199.JPG crashes.

-ahu.
Comment 13 Aaron D. Campbell 2007-04-26 15:32:18 UTC
Andreas, I have other pictures from that camera (that was OUR old camera), that work fine.  Would it be helpful to have a couple of those?  Also, I do not believe the images were processed with any other software, but I can't guarantee that.  I'm signing up for an account so that I can offer this info to the new bug as well.
Comment 14 Arnd Baecker 2007-06-12 21:37:26 UTC
Aaron, the corresponding bug http://dev.robotbattle.com/bugs/view.php?id=513 
for exiv2 has been fixed.

Shouldn't this bug be closed as well?

Thanks in advance for any feedback,

Arnd
Comment 15 Arnd Baecker 2007-06-26 10:14:38 UTC
I am closing this bug, marking it as FIXED.

Please feel free to re-open if the problem is still
there with Digikam 0.9.2, Exiv2 from svn, libkexiv2 0.1.5 
(also libkdcraw 0.1.1 will be needed).
Note that exiv2 0.14 was released before the fix (no time machine available ;-),
so the fix will only be in the svn version of exiv2.

Best, Arnd
Comment 16 Frank Siegert 2007-06-26 12:22:43 UTC
*** Bug has been marked as fixed ***.
Comment 17 caulier.gilles 2021-05-04 10:16:46 UTC
Not reproducible with digiKam 7.3.0 and Exiv2 0.27.4