Bug 382842

Summary: Segfault when opening certain image
Product: [Applications] gwenview Reporter: oleg_antonyan
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: hajenius66, jinnax, k, krzak.pawel, mahen, nk0885, private, Rychu, zoltan
Priority: NOR    
Version: 17.04.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Problematic image

Description oleg_antonyan 2017-07-28 07:39:45 UTC
Created attachment 106907 [details]
Problematic image

I'm getting segmentation fault when trying to open this image (attachement)

gwenview IMGP0006.JPG 
Warning: Directory Pentax, entry 0x0004: Data area exceeds data buffer, ignoring it.
Error: XMP Toolkit error 203: Duplicate property or field node
Warning: Failed to decode XMP metadata.
[1]    12702 segmentation fault (core dumped)  gwenview IMGP0006.JPG

openSUSE Tumbleweed
Comment 1 Christoph Feck 2017-07-28 09:56:55 UTC
Crash is in libexiv2 from http://www.exiv2.org/

Please report this issue directly do libexiv2 developers via http://dev.exiv2.org/projects/exiv2/issues

Thread 1 "gwenview" received signal SIGSEGV, Segmentation fault.
0x00007ffff180fb5f in Exiv2::ExifData::findKey(Exiv2::ExifKey const&) const () from /usr/lib64/libexiv2.so.26
(gdb) bt
#0  0x00007ffff180fb5f in Exiv2::ExifData::findKey(Exiv2::ExifKey const&) const () from /usr/lib64/libexiv2.so.26
#1  0x00007ffff18556a1 in Exiv2::Internal::PentaxMakerNote::printShutterCount(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*) ()
   from /usr/lib64/libexiv2.so.26
#2  0x00007ffff746c0cf in ?? () from /usr/lib64/libgwenviewlib.so.5
#3  0x00007ffff7468b89 in Gwenview::ImageMetaInfoModel::setExiv2Image(Exiv2::Image const*) () from /usr/lib64/libgwenviewlib.so.5
#4  0x00007ffff74207b7 in Gwenview::Document::setExiv2Image(std::auto_ptr<Exiv2::Image>) () from /usr/lib64/libgwenviewlib.so.5
#5  0x00007ffff741f7d1 in ?? () from /usr/lib64/libgwenviewlib.so.5
#6  0x00007ffff742fa11 in ?? () from /usr/lib64/libgwenviewlib.so.5
#7  0x00007ffff3a7645a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#8  0x00007ffff3873103 in QFutureWatcherBase::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff4f0a93c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff4f11cb4 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff3a48f28 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff3a4b515 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#13 0x00007ffff3a9f373 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#14 0x00007fffec763b57 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fffec763d88 in ?? () from /usr/lib64/libglib-2.0.so.0
#16 0x00007fffec763e1c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#17 0x00007ffff3a9e9ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#18 0x00007ffff3a4753a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#19 0x00007ffff3a4fdc4 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#20 0x0000555555588189 in ?? ()
#21 0x00007ffff30bc46a in __libc_start_main () from /lib64/libc.so.6
#22 0x000055555558854a in _start ()
Comment 2 oleg_antonyan 2017-07-28 11:18:17 UTC
Thanks! http://dev.exiv2.org/issues/1305
Comment 3 oleg_antonyan 2017-07-28 20:05:38 UTC
http://dev.exiv2.org/issues/1305#note-1
Robin Mills @ exiv2:

I can't reproduce this with the exiv2(.exe) command line program on MacOS-X.

506 rmills@rmillsmbp:~/gnu/exiv2/0.26 $ exiv2 -pa ~/Downloads/IMGP0006.JPG 
Warning: Directory Pentax, entry 0x0004: Data area exceeds data buffer, ignoring it.
Error: XMP Toolkit error 203: Duplicate property or field node
Warning: Failed to decode XMP metadata.
Exif.Image.Make                              Ascii      19  PENTAX Corporation
Exif.Image.Model                             Ascii      17  PENTAX Optio M50
...
Exif.Thumbnail.XResolution                   Rational    1  72
Exif.Thumbnail.YResolution                   Rational    1  72
Exif.Thumbnail.ResolutionUnit                Short       1  inch
Exif.Thumbnail.JPEGInterchangeFormat         Long        1  5520
Exif.Thumbnail.JPEGInterchangeFormatLength   Long        1  7564
507 rmills@rmillsmbp:~/gnu/exiv2/0.26 $


I confirm this on my PC
Comment 4 Christoph Feck 2017-07-30 09:48:43 UTC
*** Bug 382918 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2017-08-07 00:52:03 UTC
*** Bug 383205 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2017-08-09 08:52:19 UTC
*** Bug 383298 has been marked as a duplicate of this bug. ***
Comment 7 Antonio Rojas 2017-09-01 18:04:33 UTC
*** Bug 384268 has been marked as a duplicate of this bug. ***
Comment 8 Mahendra Tallur 2017-09-02 12:29:27 UTC
Btw, did any of you report downstream the exif2 fix ? (I.e. Ubuntu)
Comment 9 nk0885 2017-10-04 16:11:22 UTC
I have the same problem with a png Picture. Only one !
I have tried to open many other png pictures : no crash
If somebody wants to analyze this picture I can attached it.

Here details of my crashes :
Crash is in libexiv2 from http://www.exiv2.org/

Thread 1 "gwenview" received signal SIGSEGV, Segmentation fault.
0x00007ffff180fb5f in Exiv2::ExifData::findKey(Exiv2::ExifKey const&) const () from /usr/lib64/libexiv2.so.26
(gdb) bt
#0 0x00007ffff180fb5f in Exiv2::ExifData::findKey(Exiv2::ExifKey const&) const () from /usr/lib64/libexiv2.so.26
#1 0x00007ffff18556a1 in Exiv2::Internal::PentaxMakerNote::printShutterCount(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*) ()
from /usr/lib64/libexiv2.so.26
#2 0x00007ffff746c0cf in ?? () from /usr/lib64/libgwenviewlib.so.5
#3 0x00007ffff7468b89 in Gwenview::ImageMetaInfoModel::setExiv2Image(Exiv2::Image const*) () from /usr/lib64/libgwenviewlib.so.5
#4 0x00007ffff74207b7 in Gwenview::Document::setExiv2Image(std::auto_ptr) () from /usr/lib64/libgwenviewlib.so.5
#5 0x00007ffff741f7d1 in ?? () from /usr/lib64/libgwenviewlib.so.5
#6 0x00007ffff742fa11 in ?? () from /usr/lib64/libgwenviewlib.so.5
#7 0x00007ffff3a7645a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#8 0x00007ffff3873103 in QFutureWatcherBase::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#9 0x00007ffff4f0a93c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff4f11cb4 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff3a48f28 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff3a4b515 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#13 0x00007ffff3a9f373 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#14 0x00007fffec763b57 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fffec763d88 in ?? () from /usr/lib64/libglib-2.0.so.0
#16 0x00007fffec763e1c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#17 0x00007ffff3a9e9ef in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib64/libQt5Core.so.5
#18 0x00007ffff3a4753a in QEventLoop::exec(QFlags) () from /usr/lib64/libQt5Core.so.5
#19 0x00007ffff3a4fdc4 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#20 0x0000555555588189 in ?? ()
#21 0x00007ffff30bc46a in __libc_start_main () from /lib64/libc.so.6
#22 0x000055555558854a in _start ()
Comment 10 Christoph Feck 2018-06-12 01:27:54 UTC
*** Bug 395198 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2018-07-23 22:33:18 UTC
*** Bug 396800 has been marked as a duplicate of this bug. ***
Comment 12 null 2018-08-22 22:01:45 UTC
*** Bug 397722 has been marked as a duplicate of this bug. ***
Comment 13 Christoph Feck 2018-11-13 18:09:49 UTC
*** Bug 400952 has been marked as a duplicate of this bug. ***