Bug 273624

Summary: Crash when opening JPG
Product: [Applications] krita Reporter: rebuilderster
Component: GeneralAssignee: Cyrille Berger <cberger>
Status: RESOLVED FIXED    
Severity: crash CC: cberger
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description rebuilderster 2011-05-19 10:57:30 UTC
Application: krita (2.3.3)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
I have some JPG files that crash Krita every time I try to open them. They open fine in Gimp and any other application I've tried. 

This is one such image. I've filled it with white as I can't show work-related materials publicly like this, but the crashing seems unrelated to what's in the image anyway:
http://uppix.net/5/0/b/10f50e1545082bc909a1c34d2aab2.jpg

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fec271177c0 (LWP 4087))]

Thread 4 (Thread 0x7fec16480700 (LWP 4088)):
#0  0x00007fec26a83f03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fec214fb104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fec214fb9f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fec16ddfc44 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fec215223e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fec1a625853 in ?? () from /usr/lib/nvidia-current/libGL.so.1
#6  0x00007fec219c6d8c in start_thread (arg=0x7fec16480700) at pthread_create.c:304
#7  0x00007fec26a9104d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7febecb09700 (LWP 4093)):
#0  0x00007fec26a89143 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fec251dc32c in qt_safe_select (nfds=34, fdread=0x2dd9650, fdwrite=0x2dd98e8, fdexcept=0x2dd9b80, orig_timeout=<value optimized out>) at kernel/qcore_unix.cpp:82
#2  0x00007fec251e13d0 in QEventDispatcherUNIXPrivate::doSelect (this=0x2dd9490, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:219
#3  0x00007fec251e204a in QEventDispatcherUNIX::processEvents (this=0x2dd9470, flags=...) at kernel/qeventdispatcher_unix.cpp:919
#4  0x00007fec251b3882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fec251b3abc in QEventLoop::exec (this=0x7febecb08cd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fec250ca924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007fec25195c2f in QInotifyFileSystemWatcherEngine::run (this=0x2dcfb30) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fec250cd175 in QThreadPrivate::start (arg=0x2dcfb30) at thread/qthread_unix.cpp:320
#9  0x00007fec1a625853 in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007fec219c6d8c in start_thread (arg=0x7febecb09700) at pthread_create.c:304
#11 0x00007fec26a9104d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7febec099700 (LWP 4096)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fec250cd82b in wait (this=<value optimized out>, mutex=0x2c84920, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x2c84920, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fec250ca469 in QSemaphore::tryAcquire (this=0x300c610, n=1, timeout=-1) at thread/qsemaphore.cpp:221
#4  0x00007febff34e4ca in KisTileDataSwapper::run (this=0x300be50) at ../../../krita/image/tiles3/swap/kis_tile_data_swapper.cpp:90
#5  0x00007fec250cd175 in QThreadPrivate::start (arg=0x300be50) at thread/qthread_unix.cpp:320
#6  0x00007fec1a625853 in ?? () from /usr/lib/nvidia-current/libGL.so.1
#7  0x00007fec219c6d8c in start_thread (arg=0x7febec099700) at pthread_create.c:304
#8  0x00007fec26a9104d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fec271177c0 (LWP 4087)):
[KCrash Handler]
#6  exifVersionToKMDValue (value=<value optimized out>) at ../../../krita/ui/kisexiv2/kis_exif_io.cpp:50
#7  0x00007febff85af2b in KisExifIO::loadFrom (this=<value optimized out>, store=0x2edf8c0, ioDevice=0x7fffaed1b280) at ../../../krita/ui/kisexiv2/kis_exif_io.cpp:535
#8  0x00007febec0a32ce in KisJPEGConverter::decode (this=0x7fffaed1bad0, uri=<value optimized out>) at ../../../../../krita/plugins/formats/jpeg/kis_jpeg_converter.cc:315
#9  0x00007febec0a4cf3 in KisJPEGConverter::buildImage (this=0x7fffaed1bad0, uri=...) at ../../../../../krita/plugins/formats/jpeg/kis_jpeg_converter.cc:435
#10 0x00007febec0a00b9 in KisJPEGImport::convert (this=0x2f9b570, to=<value optimized out>) at ../../../../../krita/plugins/formats/jpeg/kis_jpeg_import.cc:78
#11 0x00007fec2671fe92 in KOfficeFilter::ChainLink::invokeFilter (this=0x2fb2ee0, parentChainLink=0x0) at ../../../libs/main/KoFilterChainLink.cpp:90
#12 0x00007fec26717dd9 in KoFilterChain::invokeChain (this=0x22a8c20) at ../../../libs/main/KoFilterChain.cpp:94
#13 0x00007fec26716629 in KoFilterManager::importDocument (this=0x2f9f9a0, url=..., status=@0x7fffaed1c50c) at ../../../libs/main/KoFilterManager.cpp:164
#14 0x00007fec266d26c4 in KoDocument::openFile (this=0x25c9370) at ../../../libs/main/KoDocument.cpp:1336
#15 0x00007fec24b26ab0 in KParts::ReadOnlyPartPrivate::openLocalFile (this=0x2ca2b80) at ../../kparts/part.cpp:592
#16 0x00007fec24b270f4 in KParts::ReadOnlyPart::openUrl (this=0x25c9370, url=...) at ../../kparts/part.cpp:556
#17 0x00007fec266d4eed in KoDocument::openUrl (this=0x25c9370, _url=...) at ../../../libs/main/KoDocument.cpp:1251
#18 0x00007fec266c735d in KoDocument::openExistingFile (this=0x25c9370, url=<value optimized out>) at ../../../libs/main/KoDocument.cpp:2415
#19 0x00007febff7d47bc in KisDoc2::openExistingFile (this=0x25c9370, url=...) at ../../../krita/ui/kis_doc2.cc:188
#20 0x00007febff7d6136 in KisDoc2::qt_metacall (this=0x25c9370, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaed1ca10) at ./kis_doc2.moc:87
#21 0x00007fec251c95f8 in QMetaObject::activate (sender=0x2d724a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaed1ca10) at kernel/qobject.cpp:3287
#22 0x00007fec2672d502 in KoOpenPane::openExistingFile (this=<value optimized out>, _t1=<value optimized out>) at ./KoOpenPane.moc:104
#23 0x00007fec2672ec60 in KoOpenPane::qt_metacall (this=0x2d724a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaed1cb10) at ./KoOpenPane.moc:86
#24 0x00007fec251c95f8 in QMetaObject::activate (sender=0x23f93c0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaed1cb10) at kernel/qobject.cpp:3287
#25 0x00007fec2672d1f2 in KoExistingDocumentPane::openExistingUrl (this=<value optimized out>, _t1=<value optimized out>) at ./KoExistingDocumentPane.moc:89
#26 0x00007fec2672d230 in KoExistingDocumentPane::onAccepted (this=0x23f93c0) at ../../../libs/main/KoExistingDocumentPane.cpp:56
#27 0x00007fec2672d2b1 in KoExistingDocumentPane::qt_metacall (this=0x23f93c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaed1cbe0) at ./KoExistingDocumentPane.moc:77
#28 0x00007fec251c95f8 in QMetaObject::activate (sender=0x2dc7c10, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#29 0x00007fec2461e448 in KFileWidget::slotOk (this=0x2dc7c10) at ../../kfile/kfilewidget.cpp:997
#30 0x00007fec2461f249 in KFileWidgetPrivate::_k_fileSelected (this=0x2d87410, i=...) at ../../kfile/kfilewidget.cpp:1106
#31 0x00007fec246206ce in KFileWidget::qt_metacall (this=0x2dc7c10, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaed1d260) at ./kfilewidget.moc:143
#32 0x00007fec251c95f8 in QMetaObject::activate (sender=0x260d230, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaed1d260) at kernel/qobject.cpp:3287
#33 0x00007fec24602d35 in KDirOperator::fileSelected (this=<value optimized out>, _t1=<value optimized out>) at ./kdiroperator.moc:321
#34 0x00007fec24602e15 in KDirOperator::Private::_k_slotActivated (this=0x2636800, index=<value optimized out>) at ../../kfile/kdiroperator.cpp:2364
#35 0x00007fec2460a17a in KDirOperator::qt_metacall (this=0x260d230, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0x7fffaed1d3c0) at ./kdiroperator.moc:250
#36 0x00007fec251c95f8 in QMetaObject::activate (sender=0x2e65630, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaed1d3c0) at kernel/qobject.cpp:3287
#37 0x00007fec26088a45 in QAbstractItemView::activated (this=<value optimized out>, _t1=<value optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:345
#38 0x00007fec26088bf0 in QAbstractItemView::mouseDoubleClickEvent (this=0x2e65630, event=0x7fffaed1e110) at itemviews/qabstractitemview.cpp:1833
#39 0x00007fec25bc4cd2 in QWidget::event (this=0x2e65630, event=0x7fffaed1e110) at kernel/qwidget.cpp:8263
#40 0x00007fec25f74a66 in QFrame::event (this=0x2e65630, e=0x7fffaed1e110) at widgets/qframe.cpp:557
#41 0x00007fec26085d7b in QAbstractItemView::viewportEvent (this=0x2e65630, event=0x7fffaed1e110) at itemviews/qabstractitemview.cpp:1628
#42 0x00007fec251b4627 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x21482b0, event=0x7fffaed1e110) at kernel/qcoreapplication.cpp:846
#43 0x00007fec25b739b1 in QApplicationPrivate::notify_helper (this=0x2145770, receiver=0x21482b0, e=0x7fffaed1e110) at kernel/qapplication.cpp:4458
#44 0x00007fec25b78db3 in QApplication::notify (this=<value optimized out>, receiver=0x21482b0, e=0x7fffaed1e110) at kernel/qapplication.cpp:4023
#45 0x00007fec2254b866 in KApplication::notify (this=0x7fffaed1ec30, receiver=0x21482b0, event=0x7fffaed1e110) at ../../kdeui/kernel/kapplication.cpp:311
#46 0x00007fec251b449c in QCoreApplication::notifyInternal (this=0x7fffaed1ec30, receiver=0x21482b0, event=0x7fffaed1e110) at kernel/qcoreapplication.cpp:731
#47 0x00007fec25b74a0d in sendEvent (receiver=0x21482b0, event=0x7fffaed1e110, alienWidget=0x21482b0, nativeWidget=0x2d06470, buttonDown=0x7fec26654218, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#48 QApplicationPrivate::sendMouseEvent (receiver=0x21482b0, event=0x7fffaed1e110, alienWidget=0x21482b0, nativeWidget=0x2d06470, buttonDown=0x7fec26654218, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3122
#49 0x00007fec25bf4600 in QETWidget::translateMouseEvent (this=0x2d06470, event=<value optimized out>) at kernel/qapplication_x11.cpp:4556
#50 0x00007fec25bf304a in QApplication::x11ProcessEvent (this=0x7fffaed1ec30, event=0x7fffaed1ea70) at kernel/qapplication_x11.cpp:3678
#51 0x00007fec25c1bb44 in QEventDispatcherX11::processEvents (this=0x20e8290, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#52 0x00007fec251b3882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#53 0x00007fec251b3abc in QEventLoop::exec (this=0x7fffaed1ebf0, flags=...) at kernel/qeventloop.cpp:201
#54 0x00007fec251b7ecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#55 0x00007fec26d42225 in kdemain (argc=<value optimized out>, argv=0x7fffaed1edc8) at ../../krita/main.cc:49
#56 0x00007fec269c9eff in __libc_start_main (main=0x400730 <main(int, char**)>, argc=1, ubp_av=0x7fffaed1edc8, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffaed1edb8) at libc-start.c:226
#57 0x0000000000400659 in _start ()

Reported using DrKonqi
Comment 1 Cyrille Berger 2011-05-19 11:11:07 UTC
I can confirm, it appears the data type for the ExifVersion field has changed in recent version of Exiv2.
Comment 2 Cyrille Berger 2011-06-06 09:31:47 UTC
Git commit 98d716b6ee677a85e2e11aa7d1e22873c2684b1c by Cyrille Berger.
Committed on 06/06/2011 at 09:22.
Pushed by berger into branch 'master'.

fix reading of ExifVersion, when it is returned as a string

CCBUG:273624

M  +10   -4    krita/ui/kisexiv2/kis_exif_io.cpp     

http://commits.kde.org/calligra/98d716b6ee677a85e2e11aa7d1e22873c2684b1c
Comment 3 Cyrille Berger 2011-06-06 09:31:47 UTC
Git commit c577865a1d1d912d004c7954a172edc484fc41f7 by Cyrille Berger.
Committed on 06/06/2011 at 09:31.
Pushed by berger into branch 'master'.

sometimes "Exif.Photo.ComponentsConfiguration" is a single string

BUG:273624

M  +14   -8    krita/ui/kisexiv2/kis_exif_io.cpp     

http://commits.kde.org/calligra/c577865a1d1d912d004c7954a172edc484fc41f7