Bug 447039

Summary: Gwenview crashes when opening images exported by darktable.
Product: [Applications] gwenview Reporter: yfprojects <yfprojects>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: nicolas.fella
Priority: NOR Keywords: drkonqi
Version: 19.12.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: One of the images I used to reproduce the issue.

Description yfprojects 2021-12-15 19:07:20 UTC
Application: gwenview (19.12.3)

Qt Version: 5.12.8
Frameworks Version: 5.68.0
Operating System: Linux 5.4.0-91-generic x86_64
Windowing system: X11
Distribution: Ubuntu 20.04.3 LTS

-- Information about the crash:
- What I was doing when the application crashed:

1. I opened a .png image which I would be ok with to disclose with gwenview through dolphin or in the terminal by calling `gwenview IMG_1197.png`
2. Gwenview started 
3. Gwenview crashed immediatly.

- What I can tell as well:

This issue exists for image files exported by/from darktable including `.png` and `.jpg` formats. Their thumbnail is show in Dolphin, other image viewers are able to display them without any problem. This is very likely related to #44112 but that posts title is very specific (I would even argue offtopic) and seem to refer to JPEG-images only.

The crash can be reproduced every time.

-- Backtrace:
Application: Gwenview (gwenview), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f555bcc4440 (LWP 33744))]

Thread 2 (Thread 0x7f5559d2e700 (LWP 33746)):
#0  __GI___libc_read (nbytes=16, buf=0x7f5559d2d8a0, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=7, buf=0x7f5559d2d8a0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f555f56cb2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f555f523ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f555f524312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f555f5244a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f5561bc4583 in QEventDispatcherGlib::processEvents (this=0x7f554c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#7  0x00007f5561b6b4db in QEventLoop::exec (this=this@entry=0x7f5559d2dab0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#8  0x00007f55619a3785 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#9  0x00007f55613c9efa in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007f55619a49d2 in QThreadPrivate::start (arg=0x7f556144cd80) at thread/qthread_unix.cpp:361
#11 0x00007f555fd3f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007f5561632293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f555bcc4440 (LWP 33744)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7  0x00007f5561535859 in __GI_abort () at abort.c:79
#8  0x00007f55617a0911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007f55617ac38c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f55617ac3f7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007f55617ac6a9 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007f55617a33ab in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007f5561169f49 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::at (__n=19, this=0x7ffde9d3a6f0) at ./src/tags_int.cpp:2868
#14 Exiv2::Internal::printXmpDate (os=..., value=...) at ./src/tags_int.cpp:2865
#15 0x00007f556110b60f in Exiv2::Xmpdatum::write (this=0x7f5548038f90, os=...) at ./src/xmp.cpp:278
#16 0x00007f5563601fd9 in Exiv2::operator<< (md=..., os=...) at /usr/include/exiv2/metadatum.hpp:300
#17 Gwenview::ImageMetaInfoModelPrivate::fillExivGroup<Exiv2::XmpData, __gnu_cxx::__normal_iterator<Exiv2::Xmpdatum const*, std::vector<Exiv2::Xmpdatum, std::allocator<Exiv2::Xmpdatum> > > > (this=0x563fc3d659b0, parent=..., group=group@entry=0x563fc3d65fd0, container=...) at ./lib/imagemetainfomodel.cpp:282
#18 0x00007f55635fdf23 in Gwenview::ImageMetaInfoModel::setExiv2Image (this=0x563fc3d60440, image=<optimized out>) at ./lib/imagemetainfomodel.cpp:452
#19 0x00007f55635ba470 in Gwenview::Document::setExiv2Image (this=0x563fc3d65f30, image=...) at ./lib/document/document.cpp:395
#20 0x00007f55635b9156 in Gwenview::AbstractDocumentImpl::setDocumentExiv2Image (this=this@entry=0x563fc3d68560, image=std::unique_ptr<class Exiv2::Image> = {...}) at /usr/include/c++/9/bits/move.h:74
#21 0x00007f55635c453c in Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded (this=0x563fc3d68560) at /usr/include/c++/9/bits/move.h:74
#22 0x00007f5561b98458 in QtPrivate::QSlotObjectBase::call (a=0x7ffde9d3acd0, r=0x563fc3d68560, this=0x563fc3d68660) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#23 QMetaObject::activate (sender=0x563fc3d5dc78, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3784
#24 0x00007f55619aef65 in QFutureWatcherBase::event (this=<optimized out>, event=0x7f5548016b50) at thread/qfuturewatcher.cpp:334
#25 0x00007f55627ada66 in QApplicationPrivate::notify_helper (this=this@entry=0x563fc311d730, receiver=receiver@entry=0x563fc3d5dc78, e=e@entry=0x7f5548016b50) at kernel/qapplication.cpp:3700
#26 0x00007f55627b70f0 in QApplication::notify (this=0x7ffde9d3b350, receiver=0x563fc3d5dc78, e=0x7f5548016b50) at kernel/qapplication.cpp:3446
#27 0x00007f5561b6c93a in QCoreApplication::notifyInternal2 (receiver=0x563fc3d5dc78, event=0x7f5548016b50) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:142
#28 0x00007f5561b6f5b8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x563fc31129a0) at kernel/qcoreapplication.cpp:1825
#29 0x00007f5561bc4f67 in postEventSourceDispatch (s=0x563fc31739c0) at kernel/qeventdispatcher_glib.cpp:276
#30 0x00007f555f52417d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f555f524400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f555f5244a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f5561bc4565 in QEventDispatcherGlib::processEvents (this=0x563fc31871c0, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#34 0x00007f5561b6b4db in QEventLoop::exec (this=this@entry=0x7ffde9d3b250, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#35 0x00007f5561b73246 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#36 0x0000563fc1577aaa in main (argc=<optimized out>, argv=<optimized out>) at ./app/main.cpp:168
[Inferior 1 (process 33744) detached]

The reporter indicates this bug may be a duplicate of or related to bug 441121.

Possible duplicates by query: bug 445746, bug 445496, bug 445355, bug 444851, bug 443651.

Reported using DrKonqi
Comment 1 yfprojects 2021-12-15 19:21:04 UTC
Created attachment 144582 [details]
One of the images I used to reproduce the issue.
Comment 2 yfprojects 2021-12-19 12:47:10 UTC
It probably isn't the same as bug 441121.
There it says the bug can be tracked down to `exiv2` which I haven't got installed (installing it, doesn't fix the issue) and
when I run the command that was used as an example over at the other bug report

$  exiv2 -P X print  test.jpg

no error is raised - it works just fine.
Comment 3 Nicolas Fella 2021-12-20 23:44:54 UTC
It is the same bug.

The problem is not in the exiv2 tool but rather it's library (likely called libexiv2 on your system)

*** This bug has been marked as a duplicate of bug 441121 ***