Bug 138467 - Crash in Exiv2 readMetadata when reading image saved in Photoshop.
Summary: Crash in Exiv2 readMetadata when reading image saved in Photoshop.
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 140968 144524 147270 158152 160901 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-06 19:46 UTC by Ryan Henderson
Modified: 2012-10-19 13:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to fix the problem (560 bytes, patch)
2006-12-12 23:40 UTC, Angelo Naselli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Henderson 2006-12-06 19:46:18 UTC
Version:           1.4.1 (using KDE KDE 3.5.5)
Installed from:    Fedora RPMs
OS:                Linux

Image that was saved in Photoshop 7.0 causes a crash when read by Gwenview.

The 'offending' image can be found at: 
http://www.rutsoregon.org/images/xGFscYVAsFfTX0cVTjhUCemMs61R.jpg

#12 0x4a26d97a in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0x02b2b791 in Exiv2::JpegBase::readMetadata ()
   from /usr/lib/libexiv2-0.12.so
#14 0x02c8424d in ImageUtils::JPEGContent::loadFromData ()
   from /usr/lib/libgwenviewcore.so.1
Comment 1 Angelo Naselli 2006-12-11 12:52:25 UTC
Your image crashes here as well, complete bt:
Using host libthread_db library "/lib/i686/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1237907232 (LWP 13062)]
[KCrash handler]
#9  0xbfffe410 in ?? ()
#10 0xbfdb3a8c in ?? ()
#11 0x00000006 in ?? ()
#12 0x00003306 in ?? ()
#13 0xb639bfc0 in raise () from /lib/i686/libc.so.6
#14 0xb639d851 in abort () from /lib/i686/libc.so.6
#15 0xb65862e0 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#16 0xb6583d05 in std::set_unexpected () from /usr/lib/libstdc++.so.6
#17 0xb6583d42 in std::terminate () from /usr/lib/libstdc++.so.6
#18 0xb6583e7a in __cxa_throw () from /usr/lib/libstdc++.so.6
#19 0xb7bc2ce4 in Exiv2::JpegBase::readMetadata ()
   from /usr/lib/libexiv2-0.12.so
#20 0xb7e4523d in ImageUtils::JPEGContent::loadFromData ()
   from /usr/lib/libgwenviewcore.so.1
#21 0xb7e25b59 in Gwenview::ImageLoader::changed ()
   from /usr/lib/libgwenviewcore.so.1
#22 0xb7e12fc1 in Gwenview::JPEGFormat::decode ()
   from /usr/lib/libgwenviewcore.so.1
#23 0xb6c2e843 in QImageDecoder::decode () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0xb7e24fba in Gwenview::ImageLoader::decodeChunk ()
   from /usr/lib/libgwenviewcore.so.1
#25 0xb7e253d2 in Gwenview::ImageLoader::qt_invoke ()
   from /usr/lib/libgwenviewcore.so.1
#26 0xb6c8204d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb6c82c5d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#28 0xb6f96849 in QTimer::timeout () from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0xb6ca53cf in QTimer::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0xb6c25037 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0xb6c25ea9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0xb734b26a in KApplication::notify () from /usr/lib/libkdecore.so.4
#33 0xb6c1a22b in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0xb6bd6960 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0xb6c3aa60 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0xb6c3a916 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0xb6c249ef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#38 0xb7eec0d7 in kdemain () from /usr/lib/libkdeinit_gwenview.so
#39 0x08048752 in main ()
#40 0x00000002 in ?? ()
#41 0xbfdb4744 in ?? ()
#42 0xbfdb46b8 in ?? ()
#43 0x0804878a in __libc_csu_init ()
#44 0xb638975c in __libc_start_main () from /lib/i686/libc.so.6
#45 0x080486a1 in _start ()
Comment 2 Angelo Naselli 2006-12-12 23:40:42 UTC
Created attachment 18909 [details]
patch to fix the problem

This patch should fix the problem
Comment 3 Angelo Naselli 2006-12-26 19:21:21 UTC
SVN commit 616769 by anaselli:

Catched readMetadata exceptions
 
BUG: 138467

 M  +1 -1      jpegcontent.cpp  


--- trunk/extragear/graphics/gwenview/imageutils/jpegcontent.cpp #616768:616769
@@ -255,11 +255,11 @@
 	Exiv2::Image::AutoPtr image;
 	try {
 		image = Exiv2::ImageFactory::open((unsigned char*)data.data(), data.size());
+		image->readMetadata();
 	} catch (Exiv2::Error&) {
 		kdError() << "Could not load image with Exiv2\n";
 		return false;
 	}
-	image->readMetadata();
 
 	d->mExifData = image->exifData();
 	d->mComment = QString::fromUtf8( image->comment().c_str() );
Comment 4 Angelo Naselli 2007-02-01 14:29:26 UTC
*** Bug 140968 has been marked as a duplicate of this bug. ***
Comment 5 Angelo Naselli 2007-06-26 22:52:41 UTC
*** Bug 147270 has been marked as a duplicate of this bug. ***
Comment 6 Angelo Naselli 2008-02-26 10:11:46 UTC
*** Bug 144524 has been marked as a duplicate of this bug. ***
Comment 7 Angelo Naselli 2008-04-16 17:57:16 UTC
*** Bug 160901 has been marked as a duplicate of this bug. ***
Comment 8 Dario Andres 2009-05-29 20:55:24 UTC
*** Bug 158152 has been marked as a duplicate of this bug. ***