Summary: | crash when opening image in IE | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Heiner Lamprecht <heiner> |
Component: | Metadata-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: |
Description
Heiner Lamprecht
2006-05-13 19:23:54 UTC
SVN commit 540631 by cgilles: digikam from trunk : missing exception management with Exiv2 into DMetadata::getExif() and DMetadata::getIptc() methods. Please report me if this commit fix your problem. CCMAIL: francisco.jct@gmail.com CCBUGS: 127272 M +38 -10 dmetadata.cpp --- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp #540630:540631 @@ -86,20 +86,48 @@ QByteArray DMetadata::getExif() const { - Exiv2::ExifData exif(d->exifMetadata); - Exiv2::DataBuf const c2(exif.copy()); - QByteArray data(c2.size_); - memcpy(data.data(), c2.pData_, c2.size_); - return data; + try + { + if (!d->exifMetadata.empty()) + { + Exiv2::ExifData exif(d->exifMetadata); + Exiv2::DataBuf const c2(exif.copy()); + QByteArray data(c2.size_); + memcpy(data.data(), c2.pData_, c2.size_); + return data; + } + } + catch( Exiv2::Error &e ) + { + kdDebug() << "Cannot get Exif data using Exiv2 (" + << QString::fromLocal8Bit(e.what().c_str()) + << ")" << endl; + } + + return QByteArray(); } QByteArray DMetadata::getIptc() const { - Exiv2::IptcData iptc(d->iptcMetadata); - Exiv2::DataBuf const c2(iptc.copy()); - QByteArray data(c2.size_); - memcpy(data.data(), c2.pData_, c2.size_); - return data; + try + { + if (!d->iptcMetadata.empty()) + { + Exiv2::IptcData iptc(d->iptcMetadata); + Exiv2::DataBuf const c2(iptc.copy()); + QByteArray data(c2.size_); + memcpy(data.data(), c2.pData_, c2.size_); + return data; + } + } + catch( Exiv2::Error &e ) + { + kdDebug() << "Cannot get Iptc data using Exiv2 (" + << QString::fromLocal8Bit(e.what().c_str()) + << ")" << endl; + } + + return QByteArray(); } void DMetadata::setComments(const QByteArray& data) No, the application still crashes. The crashes are not really reproducible. They occure every five to ten times but are not bound to specific images. Please rebuild digikam using full debug informations to use --enable-debug=full option with .configure script, and give me a new backtrace. Witch Exiv2 release you use ? Here, i'm use current svn implementation, not 0.9.1... Gilles I'm using 0.9.1, but next try will be with svn. I rebuilt digikam. On stderr, I get the following lines: digikam: /home/data/ImageArchive/2004/Kanada/2004-06-11__17-10-06_00.jpg : JPEG file identified Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. QFile::open: No file name specified digikam: intent: 0 lcms: Error #12288; Corrupted memory profile digikam: Error: Input profile is NULL Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. digikam: Cannot parse EXIF metadata using Exiv2 QFile::open: No file name specified Warning: Makernote IFD has a next pointer != 0 (1179209285). Ignored. KCrash: Application 'digikam' crashing... =================== Backtrace: =========================================== Using host libthread_db library "/lib/tls/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 1104843360 (LWP 25730)] [New Thread 1229913008 (LWP 25749)] [Thread debugging using libthread_db enabled] [New Thread 1104843360 (LWP 25730)] [New Thread 1229913008 (LWP 25749)] [Thread debugging using libthread_db enabled] [New Thread 1104843360 (LWP 25730)] [New Thread 1229913008 (LWP 25749)] [New Thread 1227811760 (LWP 25747)] [New Thread 1108470704 (LWP 25745)] [New Thread 1110571952 (LWP 25743)] [KCrash handler] #6 std::find_if<__gnu_cxx::__normal_iterator<Exiv2::Exifdatum*, std::vector<Exiv2::Exifdatum, std::allocator<Exiv2::Exifdatum> > >, Exiv2::FindMetadatumByIfdIdIdx> (__first={_M_current = 0x892acd0}, __last={_M_current = 0x892b0f0}, __pred={ifdId_ = Exiv2::nikon3IfdId, idx_ = 22}) at stl_algo.h:264 #7 0x405e3605 in Exiv2::ExifData::findIfdIdIdx (this=0xd, ifdId=Exiv2::nikon3IfdId, idx=22) at stl_algo.h:337 #8 0x405e3678 in Exiv2::ExifData::updateRange (this=0xbfe98704, begin=@0x0, end=@0xbfe98640, byteOrder=Exiv2::bigEndian) at exif.cpp:1035 #9 0x405e39e0 in Exiv2::ExifData::updateEntries (this=0xbfe98704) at exif.cpp:1018 #10 0x405e4797 in Exiv2::ExifData::copy (this=0xbfe98704) at exif.cpp:609 #11 0x402c1cef in Digikam::DMetadata::getExif (this=0xbfe987b0) at /home/heiner/Develop/digikam/unstable/graphics/digikam/libs/dmetadata/dmetadata.cpp:94 #12 0x40263b47 in Digikam::ImagePropertiesMetaDataTab::setCurrentURL ( this=0x81a3fc0, url=@0x8205ffc, itemType=0) at /home/heiner/Develop/digikam/unstable/graphics/digikam/libs/imageproperties/imagepropertiesmetadatatab.cpp:184 #13 0x40261a82 in Digikam::ImagePropertiesSideBarDB::slotChangedTab ( this=0x8205f48, tab=0x81a3fc0) at /home/heiner/Develop/digikam/unstable/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp:261 #14 0x40260f23 in Digikam::ImagePropertiesSideBarDB::itemChanged ( this=0x8205f48, url=@0xbfe98908, rect=0x0, img=0x0, view=0x81d9a90, item=0x865d160, info=0x81b7398, hasPrevious=true, hasNext=true) at /home/heiner/Develop/digikam/unstable/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp:196 #15 0x40261048 in Digikam::ImagePropertiesSideBarDB::itemChanged ( this=0x8205f48, url=@0xbfe98908, view=0x81d9a90, item=0x865d160, rect=0x0, img=0x0) at /home/heiner/Develop/digikam/unstable/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp:152 #16 0x4014cae6 in Digikam::DigikamView::slot_imageSelected (this=0x81de050) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/digikamview.cpp:505 #17 0x4014da1c in Digikam::DigikamView::qt_invoke (this=0x81de050, _id=86, _o=0xbfe98a14) at digikamview.moc:303 #18 0x413b288c in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #19 0x413b33de in QObject::activate_signal_bool () from /usr/lib/qt3/lib/libqt-mt.so.3 #20 0x4011ba16 in Digikam::AlbumManager::signalAlbumItemsSelected ( this=0x81566c0, t0=true) at albummanager.moc:169 #21 0x4011ba4d in Digikam::AlbumManager::emitAlbumItemsSelected ( this=0x81566c0, val=true) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albummanager.cpp:1248 #22 0x4012a77d in Digikam::AlbumItemHandler::emitItemsSelected ( this=0x81d9b2c, val=true) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albumitemhandler.cpp:39 #23 0x40154edb in Digikam::AlbumIconView::slotSelectionChanged (this=0x81d9a90) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albumiconview.cpp:1327 #24 0x4015d75e in Digikam::AlbumIconView::qt_invoke (this=0x81d9a90, _id=73, _o=0xbfe98b88) at albumiconview.moc:249 #25 0x413b2929 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x413b2de0 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x4013790d in Digikam::IconView::signalSelectionChanged (this=0x81d9a90) at iconview.moc:114 #28 0x40138893 in Digikam::IconView::selectItem (this=0x81d9a90, item=0x865d160, select=true) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/iconview.cpp:375 #29 0x4013f324 in Digikam::IconItem::setSelected (this=0x865d160, val=true, cb=true) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/iconitem.cpp:118 #30 0x40137689 in Digikam::IconView::setCurrentItem (this=0x81d9a90, item=0x865d160) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/iconview.cpp:210 #31 0x40321bbb in Digikam::ImageWindow::setViewToURL (this=0x877ec90, url=@0x8926758) at /home/heiner/Develop/digikam/unstable/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp:338 #32 0x4032364d in Digikam::ImageWindow::slotLoadCurrent (this=0x877ec90) at /home/heiner/Develop/digikam/unstable/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp:318 #33 0x4032383e in Digikam::ImageWindow::qt_invoke (this=0x877ec90, _id=112, _o=0xbfe98d74) at imagewindow.moc:181 #34 0x413b2929 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x416ff892 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x413cf84b in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x413d7393 in QSingleShotTimer::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0x41351f41 in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #39 0x413528c9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #40 0x40fca0de in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4 #41 0x41346a94 in QEventLoop::activateTimers () from /usr/lib/qt3/lib/libqt-mt.so.3 #42 0x412ff67e in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #43 0x41368ff2 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #44 0x41368ed6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #45 0x4135188f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #46 0x0804aa31 in main (argc=1, argv=0xbfe99434) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/main.cpp:273 Your color management configuration is broken. Fix it or disable it and try again. Gilles I disabled cm. Now digikam crashed with a different message. After the crash-handler appears, digikam runs amok until it gets killed by the system. Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 1105003104 (LWP 4031)] [New Thread 1209969584 (LWP 4060)] [Thread debugging using libthread_db enabled] [New Thread 1105003104 (LWP 4031)] [New Thread 1209969584 (LWP 4060)] [Thread debugging using libthread_db enabled] [New Thread 1105003104 (LWP 4031)] [New Thread 1209969584 (LWP 4060)] [New Thread 1183800240 (LWP 4058)] [New Thread 1181698992 (LWP 4056)] [New Thread 1232243632 (LWP 4054)] [New Thread 1230142384 (LWP 4052)] [New Thread 1228041136 (LWP 4050)] [New Thread 1108630448 (LWP 4048)] [New Thread 1110731696 (LWP 4046)] 0x4040c1e4 in sqlite3_step () from /usr/lib/libsqlite3.so.0 #0 0x4040c1e4 in sqlite3_step () from /usr/lib/libsqlite3.so.0 #1 0x4012ac44 in Digikam::AlbumDB::execSql (this=0x8154540, sql=@0xbfc78b60, values=0xbfc78b5c, debug=false) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albumdb.cpp:652 #2 0x4012bda1 in Digikam::AlbumDB::getItemRating (this=0x8154540, imageID=6048) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albumdb.cpp:1029 #3 0x4017f517 in Digikam::ImageInfo::rating (this=0x862b800) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/imageinfo.cpp:267 #4 0x40161948 in Digikam::AlbumIconItem::paintItem (this=0x86a2c78) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/albumiconitem.cpp:260 #5 0x40139d01 in Digikam::IconView::viewportPaintEvent (this=0x81ee680, pe=0xbfc794ec) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/iconview.cpp:707 #6 0x414f4105 in QScrollView::eventFilter () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x413d966e in QObject::activate_filters () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x413d96eb in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #9 0x41413d9c in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #10 0x41378f41 in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #11 0x413798c9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #12 0x40ff10de in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4 #13 0x41349b08 in QWidget::repaint () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x4137a99b in QApplication::sendPostedEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x4137aa64 in QApplication::sendPostedEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x4132628c in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #17 0x4138ffd8 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #18 0x4138fed6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #19 0x4137888f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #20 0x0804aa31 in main (argc=1, argv=0xbfc79984) at /home/heiner/Develop/digikam/unstable/graphics/digikam/digikam/main.cpp:273 Heiner, cleanup all. Check if you have mixed Exiv2 libarary installed in your computer (for example 0.9.1 and 0.10.0. Install only Exiv2 0.10.0 and recompile digikam using a fresh svn checkout and to enable all debug informations using --enable-debug=full .configure option. Gilles Caulier Heiner, please give us a fresh report using current digiKAm implementation from svn. thanks in advance... Gilles Caulier Using a fresh checkout, I'm not able to reproduce the crash any more. Thanks, Heiner Sorry, forgot to close the issue ... |