Bug 255286 - KPA crashes when certain photos are loaded
Summary: KPA crashes when certain photos are loaded
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 07:16 UTC by Mark Harrison
Modified: 2012-01-17 00:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Photo that crashes KPA. Possible corrupt EXIF data. (133.20 KB, image/jpeg)
2010-10-26 07:22 UTC, Mark Harrison
Details
Output of "exif -d" on attached photo to show which data is corrupt. (8.53 KB, text/plain)
2010-11-08 12:27 UTC, Mark Harrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Harrison 2010-10-26 07:16:36 UTC
Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

Kphotoalbum version 4.1.1 running in Ubuntu 10.10

I've found a number of photos of mine that cause KPA to crash immediately after startup when it attempts to load them.  Running the 'exif' command line tool on these photos indicates that there may be corrupt exif data.  Other programs like gthumb seem to have no problem displaying or reading the exif data in this photo.

I've attached one of the problem photos.

I'm not sure if this is related to bug 237889 (https://bugs.kde.org/show_bug.cgi?id=237889).

Reproducible: Always

Steps to Reproduce:
To reproduce with demo database:

1. Run kphotoalbum -demo
2. Quit without deleting demo database
3. Copy photo attached to this report into demo database (/tmp/kphotoalbum-demo-$USER/)
4. Run kphotoalbum -demo again

Actual Results:  
KPA crashes immediately after startup.


Application: KPhotoAlbum (kphotoalbum), signal: Segmentation fault
[Current thread is 1 (Thread 0xb770e740 (LWP 18897))]

Thread 2 (Thread 0xb7477b70 (LWP 18898)):
#0  0x00e2f416 in __kernel_vsyscall ()
#1  0x01475de6 in __poll (fds=0x150dff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x019faa1b in g_poll () from /lib/libglib-2.0.so.0
#3  0x019ed43c in ?? () from /lib/libglib-2.0.so.0
#4  0x019edba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x02d456b4 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x01a1448f in ?? () from /lib/libglib-2.0.so.0
#7  0x006c0cc9 in start_thread (arg=0xb7477b70) at pthread_create.c:304
#8  0x014846ae in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb770e740 (LWP 18897)):
[KCrash Handler]
#7  0x005600a1 in ?? () from /usr/lib/libexiv2.so.6
#8  0x081482e2 in ?? ()
#9  0x081488f1 in ?? ()
#10 0x081489d8 in ?? ()
#11 0x08132b2d in ?? ()
#12 0x08134359 in ?? ()
#13 0x08149914 in ?? ()
#14 0x0814a4a0 in ?? ()
#15 0x0814b11f in ?? ()
#16 0x081471b5 in ?? ()
#17 0x08147163 in ?? ()
#18 0x080a921f in ?? ()
#19 0x06ae08ca in QMetaObject::metacall (object=0x9cc7608, cl=QMetaObject::InvokeMetaMethod, idx=9, argv=0xbfdb578c) at kernel/qmetaobject.cpp:237
#20 0x06af36ad in QMetaObject::activate (sender=0x9ccabc0, m=0x6c0d5a4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3280
#21 0x06b451e7 in QTimer::timeout (this=0x9ccabc0) at .moc/release-shared/moc_qtimer.cpp:134
#22 0x06af91ce in QTimer::timerEvent (this=0x9ccabc0, e=0xbfdb5cc0) at kernel/qtimer.cpp:271
#23 0x06aed504 in QObject::event (this=0x9ccabc0, e=0x0) at kernel/qobject.cpp:1183
#24 0x03731fdc in QApplicationPrivate::notify_helper (this=0x9b18b08, receiver=0x9ccabc0, e=0xbfdb5cc0) at kernel/qapplication.cpp:4396
#25 0x0373804e in QApplication::notify (this=0xbfdb602c, receiver=0x9ccabc0, e=0xbfdb5cc0) at kernel/qapplication.cpp:3798
#26 0x011d568a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0x06adab3b in QCoreApplication::notifyInternal (this=0xbfdb602c, receiver=0x9ccabc0, event=0xbfdb5cc0) at kernel/qcoreapplication.cpp:732
#28 0x06b0cad6 in sendEvent (this=0x9b1bd34) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QTimerInfoList::activateTimers (this=0x9b1bd34) at kernel/qeventdispatcher_unix.cpp:602
#30 0x06b09874 in timerSourceDispatch (source=0x9b1bd00) at kernel/qeventdispatcher_glib.cpp:184
#31 0x019e9855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#32 0x019ed668 in ?? () from /lib/libglib-2.0.so.0
#33 0x019ed848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#34 0x06b09565 in QEventDispatcherGlib::processEvents (this=0x9af1310, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#35 0x037f3be5 in QGuiEventDispatcherGlib::processEvents (this=0x9af1310, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x06ad9609 in QEventLoop::processEvents (this=0xbfdb5f84, flags=) at kernel/qeventloop.cpp:149
#37 0x06ad9a8a in QEventLoop::exec (this=0xbfdb5f84, flags=...) at kernel/qeventloop.cpp:201
#38 0x06ade00f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#39 0x03730e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#40 0x0807e5b5 in _start ()
Comment 1 Mark Harrison 2010-10-26 07:22:53 UTC
Created attachment 52874 [details]
Photo that crashes KPA.  Possible corrupt EXIF data.
Comment 2 Mark Harrison 2010-11-08 12:27:10 UTC
Created attachment 53241 [details]
Output of "exif -d" on attached photo to show which data is corrupt.
Comment 3 Mark Harrison 2010-11-11 03:49:14 UTC
Stripping all metadata using "jhead -purejpg" allows photo to be imported without crashing.  Obviously, this isn't an ideal solution.
Comment 4 caulier.gilles 2010-12-13 08:49:30 UTC
This crash is relevant of exiv2. I CC Andreas for info.

Gilles Caulier
Comment 5 Mark Harrison 2010-12-17 16:38:14 UTC
I managed to work around this bug by using exiftool to fix the exif tags, specifically:

exiftool -XResolution=180 -Orientation='Horizontal (normal)' $pic

These two tags (XResolution and Orientation) were invalid (or blank) from all the photos that caused KPA to crash.

exiftool -Orientation $pic
Orientation                     : Unknown ()

exiftool -XResolution $pic
X Resolution                    : 


Actually, only the Orientation tag needed to be fixed in order for it to be properly loaded into KPA. So, 

exiftool -Orientation='Horizontal (normal)' $pic

was sufficient.
Comment 6 Miika Turkia 2010-12-22 06:40:51 UTC
This should be fixed now in revision 1208526.
Comment 7 Andreas Huggel 2012-01-17 00:55:56 UTC
Which version of libexiv2 are you using?
Can you post the output of exiv2 $pic and exiv2 -u -pa $pic from one of the problematic images, or does that crash too?
-ahu.
Comment 8 Andreas Huggel 2012-01-17 00:57:01 UTC
Forget my post above. Didn't realize this was that old.
-ahu.