Bug 471029

Summary: Gwenview crashes immediately when i specifically try to open these images
Product: [Applications] gwenview Reporter: chocoman <a945ersg>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: idontfeelcomfygivingyoumyemail, markusbass9, martynjlewis79, nicolas.fella, rewarp
Priority: NOR Keywords: drkonqi
Version First Reported In: 23.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description chocoman 2023-06-14 16:52:46 UTC
Application: gwenview (23.04.2)

Qt Version: 5.15.9
Frameworks Version: 5.107.0
Operating System: Linux 6.3.7-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.5 [KCrashBackend]

-- Information about the crash:
Gwenview immediately crashes when i try to open these 2 images
original files linked here
https://gofile.io/d/Gng6aT

The crash can be reproduced every time.

-- Backtrace:
Application: Gwenview (gwenview), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#7  0x00007f08cf89f2d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#8  0x00007f08cf84fa08 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#9  0x00007f08cf838538 in __GI_abort () at abort.c:79
#10 0x00007f08cfa9ca6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#11 0x00007f08cfab011c in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#12 0x00007f08cfab0189 in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#13 0x00007f08cfab03ed in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7f08d0327538 <typeinfo for QUnhandledException>, dest=0x7f08cfef9770 <QUnhandledException::~QUnhandledException()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
#14 0x00007f08cfea26f7 in QUnhandledException::raise (this=<optimized out>) at /usr/include/c++/13.1.1/bits/exception.h:65
#15 0x00007f08cfefe332 in QFutureInterfaceBase::waitForResult (this=0x5588eff2df88, resultIndex=0) at thread/qfutureinterface.cpp:315
#16 0x00007f08d2453cc4 in QFuture<bool>::result (this=<optimized out>) at /usr/include/qt/QtCore/qfuture.h:208
#17 Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded (this=0x5588f02247c0) at /usr/src/debug/gwenview/gwenview-23.04.2/lib/document/loadingdocumentimpl.cpp:488
#18 0x00007f08d00cffe7 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false> (sender=0x5588eff2df98, signal_index=4, argv=0x7ffccfc9b2f0) at kernel/qobject.cpp:3923
#20 0x00007f08cfefd0d5 in QFutureWatcherBase::event (this=<optimized out>, event=0x7f08258f8890) at thread/qfuturewatcher.cpp:334
#21 0x00007f08d0d7893f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5588eff2df98, e=0x7f08258f8890) at kernel/qapplication.cpp:3640
#22 0x00007f08d009ab18 in QCoreApplication::notifyInternal2 (receiver=0x5588eff2df98, event=0x7f08258f8890) at kernel/qcoreapplication.cpp:1064
#23 0x00007f08d009fa7b in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5588ef601b20) at kernel/qcoreapplication.cpp:1821
#24 0x00007f08d00e6088 in postEventSourceDispatch (s=0x5588ef6d7930) at kernel/qeventdispatcher_glib.cpp:277
#25 0x00007f08ce082981 in g_main_dispatch (context=0x7f08c4000ee0) at ../glib/glib/gmain.c:3460
#26 g_main_context_dispatch (context=0x7f08c4000ee0) at ../glib/glib/gmain.c:4200
#27 0x00007f08ce0dfb39 in g_main_context_iterate.isra.0 (context=context@entry=0x7f08c4000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#28 0x00007f08ce080032 in g_main_context_iteration (context=0x7f08c4000ee0, may_block=1) at ../glib/glib/gmain.c:4343
#29 0x00007f08d00e9f0c in QEventDispatcherGlib::processEvents (this=0x5588ef6e0410, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#30 0x00007f08d0099824 in QEventLoop::exec (this=this@entry=0x7ffccfc9b720, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#31 0x00007f08d009acc3 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#32 0x00007f08d053b7c2 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#33 0x00007f08d0d76cda in QApplication::exec () at kernel/qapplication.cpp:2832
#34 0x00005588ef3dea49 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/gwenview/gwenview-23.04.2/app/main.cpp:213
[Inferior 1 (process 403874) detached]

Reported using DrKonqi
Comment 1 Nicolas Fella 2023-06-14 19:46:00 UTC
Might be related to https://bugs.kde.org/show_bug.cgi?id=470880
Comment 2 Nicolas Fella 2023-06-14 19:48:50 UTC
This appears to be a regression in exiv 0.28
Comment 3 chocoman 2023-06-15 02:28:02 UTC
(In reply to Nicolas Fella from comment #2)
> This appears to be a regression in exiv 0.28

ohhhh
Comment 4 Nicolas Fella 2023-06-16 10:01:42 UTC
See also https://github.com/Exiv2/exiv2/issues/2650
Comment 5 Martyn Lewis 2023-08-16 19:22:46 UTC
Same problem here, two files in particular - one jpg and one png. I have tried with various other png and jpgs and no problem with them.
Comment 6 Nicolas Fella 2023-09-17 23:33:25 UTC
*** Bug 474619 has been marked as a duplicate of this bug. ***
Comment 7 Rewarp 2023-09-23 14:42:59 UTC
Created attachment 161821 [details]
New crash information added by DrKonqi

gwenview (23.08.1) using Qt 5.15.10

I was creating some images using Stable Diffusion and noticed images produced when I selected the option to embed the prompt settings to produce the image in the png file would cause gwenview to crash. Images where I chose to generate a separate .json file instead were unaffected.

I tested the exif2 issue linked in https://bugs.kde.org/show_bug.cgi?id=471029#c4 and following the brief test shows a similar result: 

```
exiv2 --Print xkycvt origami_style_blue_river_flowing_through_wooden_va_CRCGSAZ0.png
Uncaught exception: Overflow in Exiv2::DataBuf::c_data
```

-- Backtrace (Reduced):
#11 0x00007fd65f2bcd6f in QUnhandledException::raise() const (this=<optimized out>) at /usr/include/c++/13/bits/exception.h:65
#12 0x00007fd65f30ac8d in QFutureInterfaceBase::waitForResult(int) (this=this@entry=0x5647c5703518, resultIndex=resultIndex@entry=0) at thread/qfutureinterface.cpp:315
#13 0x00007fd661834e1f in QFuture<bool>::result() const (this=<optimized out>) at /usr/include/qt5/QtCore/qfuture.h:208
#14 Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded() (this=0x5647c54bb250) at /usr/src/debug/gwenview-23.08.1/lib/document/loadingdocumentimpl.cpp:488
#15 0x00007fd65f525812 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdea00a9e0, r=0x5647c54bb250, this=0x5647c54bb220) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
Comment 8 A Linux User 2025-08-19 17:18:31 UTC
Is this still an issue?
Comment 9 Rewarp 2025-08-20 02:16:16 UTC
(In reply to A Linux User from comment #8)
> Is this still an issue?

I can no longer reproduce it, so I think it has been resolved.