Bug 256841 - Crashes when trying to open certain jpg images [Exiv2::ValueType<unsigned short>::toLong, Gwenview::JpegContent::orientation, Gwenview::JpegContent::loadFromData]
Summary: Crashes when trying to open certain jpg images [Exiv2::ValueType<unsigned sho...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 2.6
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 241783 261067 275353 277218 278400 280870 280871 313524 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-13 21:05 UTC by PAwel Sikorski
Modified: 2017-09-10 19:55 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9.5


Attachments
New crash information added by DrKonqi (4.65 KB, text/plain)
2011-01-09 21:00 UTC, Widya Walesa
Details
New crash information added by DrKonqi (4.65 KB, text/plain)
2011-01-09 21:00 UTC, Widya Walesa
Details
JPEG file that crashed gwenview 4.9.95 using libexiv2 version 0.23 (170.42 KB, image/jpeg)
2012-12-23 18:14 UTC, Widya Walesa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PAwel Sikorski 2010-11-13 21:05:35 UTC
Application: gwenview (2.5.2)
KDE Platform Version: 4.5.2 (KDE 4.5.2)
Qt Version: 4.7.0
Operating System: Linux 2.6.35.6-48.fc14.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
Pictures taken using canon camera

The crash can be reproduced every time.

-- Backtrace:
Application: Gwenview (gwenview), signal: Segmentation fault
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
162	62:	movl	(%rsp), %edi
[Current thread is 1 (Thread 0x7fd386665840 (LWP 6621))]

Thread 3 (Thread 0x7fd3805a1700 (LWP 6622)):
#0  0x000000324aeda883 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x000000324c642374 in g_main_context_poll (context=0x286e1b0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:3093
#2  g_main_context_iterate (context=0x286e1b0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2775
#3  0x000000324c642c82 in g_main_loop_run (loop=0x286e290) at gmain.c:2988
#4  0x0000003f118a5774 in gdbus_shared_thread_func (data=<value optimized out>) at gdbusprivate.c:277
#5  0x000000324c669446 in g_thread_create_proxy (data=0x286e2b0) at gthread.c:1897
#6  0x000000324b606d5b in start_thread (arg=0x7fd3805a1700) at pthread_create.c:301
#7  0x000000324aee427d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7fd374e53700 (LWP 6627)):
[KCrash Handler]
#6  0x0000003f1247f908 in Exiv2::ValueType<unsigned short>::toLong (this=0x7fd36c031560, n=0) at value.hpp:1580
#7  0x0000003d5bc85549 in Gwenview::JpegContent::orientation (this=<value optimized out>) at /usr/src/debug/kdegraphics-4.5.2/gwenview/lib/jpegcontent.cpp:264
#8  0x0000003d5bc86115 in Gwenview::JpegContent::loadFromData (this=0x7fd36c031540, data=..., exiv2Image=<value optimized out>) at /usr/src/debug/kdegraphics-4.5.2/gwenview/lib/jpegcontent.cpp:238
#9  0x0000003d5bc6490a in Gwenview::LoadingDocumentImplPrivate::loadMetaInfo (this=0x2d17980) at /usr/src/debug/kdegraphics-4.5.2/gwenview/lib/document/loadingdocumentimpl.cpp:183
#10 0x0000003d5bc64656 in QtConcurrent::StoredMemberFunctionPointerCall0<bool, Gwenview::LoadingDocumentImplPrivate>::runFunctor (this=0x2b67240) at /usr/include/QtCore/qtconcurrentstoredfunctioncall.h:200
#11 0x0000003d5bc64a07 in QtConcurrent::RunFunctionTask<bool>::run (this=0x2b67240) at /usr/include/QtCore/qtconcurrentrunbase.h:103
#12 0x0000003252668c28 in QThreadPoolThread::run (this=0x2cc1250) at concurrent/qthreadpool.cpp:106
#13 0x000000325267264e in QThreadPrivate::start (arg=0x2cc1250) at thread/qthread_unix.cpp:266
#14 0x000000324b606d5b in start_thread (arg=0x7fd374e53700) at pthread_create.c:301
#15 0x000000324aee427d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fd386665840 (LWP 6621)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x0000003252672d3b in wait (this=<value optimized out>, mutex=0x2cca600, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x2cca600, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x0000003252668281 in QThreadPoolPrivate::waitForDone (this=0x2cca570) at concurrent/qthreadpool.cpp:295
#4  0x000000325266926f in QThreadPool::~QThreadPool (this=0x2cc13b0, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:428
#5  0x00000032526692a9 in QThreadPool::~QThreadPool (this=0x2cc13b0, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:430
#6  0x00000032526697a5 in QGlobalStaticDeleter<QThreadPool>::~QGlobalStaticDeleter (this=0x3252a8cd68, __in_chrg=<value optimized out>) at ../../src/corelib/global/qglobal.h:1810
#7  0x000000324ae379c1 in __run_exit_handlers (status=1) at exit.c:78
#8  exit (status=1) at exit.c:100
#9  0x0000003d5c06a476 in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#10 0x000000325e01f1a8 in KApplication::xioErrhandler (this=0x7fff6454b5d0, dpy=0x2842e10) at /usr/src/debug/kdelibs-4.5.2/kdeui/kernel/kapplication.cpp:416
#11 0x000000324e64686e in _XIOError (dpy=0x2842e10) at XlibInt.c:3140
#12 0x000000324e64d8bd in _XEventsQueued (dpy=0x2842e10, mode=<value optimized out>) at xcb_io.c:306
#13 0x000000324e6365df in XEventsQueued (dpy=0x2842e10, mode=2) at Pending.c:43
#14 0x000000325325853c in x11EventSourceCheck (s=0x2822db0) at kernel/qguieventdispatcher_glib.cpp:85
#15 0x000000324c641ab8 in g_main_context_check (context=0x28219f0, max_priority=2147483647, fds=<value optimized out>, n_fds=<value optimized out>) at gmain.c:2658
#16 0x000000324c642392 in g_main_context_iterate (context=0x28219f0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2777
#17 0x000000324c6428ad in g_main_context_iteration (context=0x28219f0, may_block=1) at gmain.c:2843
#18 0x00000032527868af in QEventDispatcherGlib::processEvents (this=0x2807760, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#19 0x00000032532586ee in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#20 0x000000325275ab42 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#21 0x000000325275ad8c in QEventLoop::exec (this=0x7fff6454b4f0, flags=...) at kernel/qeventloop.cpp:201
#22 0x000000325275f20b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#23 0x000000000043c60f in main (argc=6, argv=0x7fff6454b9c8) at /usr/src/debug/kdegraphics-4.5.2/gwenview/app/main.cpp:139

Reported using DrKonqi
Comment 1 Dario Andres 2010-11-15 21:16:13 UTC
[Comment from a bug triager]
This bug looks related to the crash on bug 241783. Regards
Comment 2 Dario Andres 2010-12-23 14:05:35 UTC
[Comment from a bug triager]
From bug 261067:
- What I was doing when the application crashed:
Crashes on most images from a canon SLR camera. It looks like it happens when
the application generates a preview of images in a directory.
The crash can be reproduced every time.
Comment 3 Dario Andres 2010-12-23 14:05:41 UTC
*** Bug 261067 has been marked as a duplicate of this bug. ***
Comment 4 Aurelien Gateau 2010-12-28 00:15:45 UTC
Thanks for the report. Can you attach one of the images which cause the crash?
Comment 5 PAwel Sikorski 2011-01-03 09:43:46 UTC
Hi,
I can not attach the image to one the report page, as it is to large. 
Resizing it eliminates the problem. Hope this works.


On 12/28/2010 12:15 AM, Aurelien Gateau wrote:
> https://bugs.kde.org/show_bug.cgi?id=256841
>
>
>
>
>
> --- Comment #4 from Aurelien Gateau<agateau kde org>   2010-12-28 00:15:45 ---
> Thanks for the report. Can you attach one of the images which cause the crash?
>
Comment 6 Widya Walesa 2011-01-09 21:00:54 UTC
Created attachment 55780 [details]
New crash information added by DrKonqi

gwenview (2.5.0) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.0

- What I was doing when the application crashed:
I was opening a folder contains some jpeg images using gwenview.

-- Backtrace (Reduced):
#7  0x00007fa355039b04 in Gwenview::JpegContent::orientation() const () from /usr/lib64/libgwenviewlib.so.4
#8  0x00007fa35503a675 in Gwenview::JpegContent::loadFromData(QByteArray const&, Exiv2::Image*) () from /usr/lib64/libgwenviewlib.so.4
#9  0x00007fa35503a89b in Gwenview::JpegContent::loadFromData(QByteArray const&) () from /usr/lib64/libgwenviewlib.so.4
#10 0x00007fa35503ab0a in Gwenview::JpegContent::load(QString const&) () from /usr/lib64/libgwenviewlib.so.4
[...]
Comment 7 Widya Walesa 2011-01-09 21:00:56 UTC
Created attachment 55781 [details]
New crash information added by DrKonqi

gwenview (2.5.0) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.0

- What I was doing when the application crashed:
I was opening a folder contains some jpeg images using gwenview.

-- Backtrace (Reduced):
#7  0x00007fa355039b04 in Gwenview::JpegContent::orientation() const () from /usr/lib64/libgwenviewlib.so.4
#8  0x00007fa35503a675 in Gwenview::JpegContent::loadFromData(QByteArray const&, Exiv2::Image*) () from /usr/lib64/libgwenviewlib.so.4
#9  0x00007fa35503a89b in Gwenview::JpegContent::loadFromData(QByteArray const&) () from /usr/lib64/libgwenviewlib.so.4
#10 0x00007fa35503ab0a in Gwenview::JpegContent::load(QString const&) () from /usr/lib64/libgwenviewlib.so.4
[...]
Comment 8 Myriam Schweingruber 2011-12-09 11:34:29 UTC
*** Bug 241783 has been marked as a duplicate of this bug. ***
Comment 9 Myriam Schweingruber 2011-12-09 11:35:20 UTC
*** Bug 280871 has been marked as a duplicate of this bug. ***
Comment 10 Myriam Schweingruber 2011-12-09 11:35:55 UTC
*** Bug 280870 has been marked as a duplicate of this bug. ***
Comment 11 Myriam Schweingruber 2011-12-09 11:36:34 UTC
*** Bug 278400 has been marked as a duplicate of this bug. ***
Comment 12 Myriam Schweingruber 2011-12-09 11:37:02 UTC
*** Bug 277218 has been marked as a duplicate of this bug. ***
Comment 13 Myriam Schweingruber 2011-12-09 11:37:38 UTC
*** Bug 275353 has been marked as a duplicate of this bug. ***
Comment 14 Myriam Schweingruber 2011-12-09 11:40:39 UTC
The problem appears to be a crash in libexif2 for rather large files. Please all, upgrade your exif2 library and check if this is fixed now.
Comment 15 Benni Hill 2012-12-01 14:10:01 UTC
Please reopen if this is still a problem with current versions of gwenview and libexif2.
Comment 16 Widya Walesa 2012-12-23 18:09:34 UTC
Please reopen this bug. I'm doing my own testing KDE 4.9.95 in Slackware 14 and got hit by this bug. I am using Slackware's stock libexiv2 (package: exiv2) version 0.23. I attach the JPEG file in case somebody wants to test opening it. This file also made nepomukindexer process got segfault (pardon me if this information is unrelated to the bug).
Comment 17 Widya Walesa 2012-12-23 18:14:49 UTC
Created attachment 75987 [details]
JPEG file that crashed gwenview 4.9.95 using libexiv2 version 0.23
Comment 18 Benni Hill 2012-12-24 00:14:23 UTC
https://git.reviewboard.kde.org/r/107891/
Comment 19 Widya Walesa 2012-12-24 05:52:21 UTC
(In reply to comment #18)
> https://git.reviewboard.kde.org/r/107891/

Thanks, rebuilding gwenview using the patch works.
Comment 20 Benni Hill 2012-12-27 00:42:51 UTC
Git commit fac880029e33fe1170e2ba43cb767fad11a7d2f6 by Benjamin Löwe.
Committed on 24/12/2012 at 01:17.
Pushed by bennihill into branch 'KDE/4.9'.

Fix for bug 256841 - Crashes when trying to open certain jpg images
REVIEW: 107891
FIXED-IN: 2.9.5

M  +4    -1    lib/jpegcontent.cpp

http://commits.kde.org/gwenview/fac880029e33fe1170e2ba43cb767fad11a7d2f6
Comment 21 Nate Graham 2017-09-10 19:55:56 UTC
*** Bug 313524 has been marked as a duplicate of this bug. ***