Bug #1274

crash in Exiv2 shared library when preview from image is extracted

Added by Wil Cowb 8 months ago. Updated 8 months ago.

Status:ClosedStart date:31 Jan 2017
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:insufficient informationEstimated time:1.00 hour
Target version:0.26

Description

Thread 166 "Thread (pooled)" hit Catchpoint 1 (exception thrown), 0x00007fffebe788bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007fffebe788bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff5dcce3c in Exiv2::ImageFactory::open (io=...) at /b/ext_exiv2/ext_exiv2-prefix/src/ext_exiv2/src/image.cpp:858
#2 0x00007ffff5dccf49 in Exiv2::ImageFactory::open (path=..., useCurl=<optimized out>) at /b/ext_exiv2/ext_exiv2-prefix/src/ext_exiv2/src/image.cpp:833
#3 0x00007ffff680dce1 in Digikam::MetaEngine::load (this=this@entry=0x7fff21812970, filePath=...) at /b/dktemp/digikam-master/core/libs/dmetadata/metaengine.cpp:278
#4 0x00007ffff68564c6 in Digikam::DMetadata::load (this=this@entry=0x7fff21812970, filePath=...) at /b/dktemp/digikam-master/core/libs/dmetadata/dmetadata.cpp:96
#5 0x00007ffff6856542 in Digikam::DMetadata::DMetadata (this=0x7fff21812970, filePath=...) at /b/dktemp/digikam-master/core/libs/dmetadata/dmetadata.cpp:63
#6 0x00007ffff689b648 in Digikam::PreviewLoadingTask::loadImagePreview (this=this@entry=0x410d980, sizeLimit=1366)
at /b/dktemp/digikam-master/core/libs/threadimageio/previewtask.cpp:586
#7 0x00007ffff689c8a9 in Digikam::PreviewLoadingTask::execute (this=0x410d980) at /b/dktemp/digikam-master/core/libs/threadimageio/previewtask.cpp:309
#8 0x00007ffff6886f12 in Digikam::LoadSaveThread::run (this=0xf17ed0) at /b/dktemp/digikam-master/core/libs/threadimageio/loadsavethread.cpp:133
#9 0x00007ffff68c4f6e in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xf9e9d0) at /b/dktemp/digikam-master/core/libs/threads/dynamicthread.cpp:183
#10 0x00000031e02abf8d in ?? () from /tmp/.mount_71JDmt/usr/lib/libQt5Core.so.5
#11 0x00000031e02aef49 in ?? () from /tmp/.mount_71JDmt/usr/lib/libQt5Core.so.5
#12 0x00007ffff5a4e6ba in start_thread (arg=0x7fff21813700) at pthread_create.c:333
#13 0x00007fffeb60982d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)

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

History

#1 Updated by Robin Mills 8 months ago

  • Category set to not-a-bug
  • Status changed from New to Closed
  • Assignee set to Robin Mills
  • % Done changed from 0 to 100
  • Estimated time set to 1.00

Without a test file, there is nothing to be investigated. Case closed.

#2 Updated by Robin Mills 8 months ago

This code is crashing in the C++ library and not in libexiv2 itself. I had a private email discussion recently with a Qt user who was crashing on a path which contained an o-umlaut (Köln) and I suggested he try Qt's (const char*)qstringPath.toUtf8() . Indeed the following is now working for him:

bool Picdok::getExifData(const QString & inFile, QString &retComm, QString &retOrtn, QString &retDate)
// Get the UserComment, Orientation and DateTimeOriginal from the EXIF data.
{
    Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((const char*)inFile.toUtf8());
...
Looking at the code in https://cgit.kde.org/digikam.git/tree/libs/dmetadata/metaengine.cpp#n278 I see:
image        = Exiv2::ImageFactory::open((const char*)(QFile::encodeName(filePath)).constData());
Can you try changing this to:
image        = Exiv2::ImageFactory::open((const char*)filePath.toUtf8());
If this doesn't fix things, please attach the file causing the crash and I will reopen this issue and investigate.

#3 Updated by Robin Mills 8 months ago

  • Category changed from not-a-bug to insufficient information

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux