Bug 470821 - Segfault viewing some images
Summary: Segfault viewing some images
Status: RESOLVED UPSTREAM
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.04.2
Platform: Arch Linux Linux
: HI crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 471167 471228 471232 471308 494212 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-06-09 07:31 UTC by cenon.delrosario
Modified: 2024-10-06 17:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Test image causing segfaults (859.36 KB, image/jpeg)
2023-06-09 07:34 UTC, cenon.delrosario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cenon.delrosario 2023-06-09 07:31:40 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open attached JPG image

OBSERVED RESULT
Gwenview will close immediately and segfault in logs

EXPECTED RESULT
Image should be displayed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: EndeavourOS 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.6-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT
Manufacturer: Micro-Star International Co., Ltd
Product Name: MS-7C02
System Version: 1.0

ADDITIONAL INFORMATION
Segfault in log:
segfault at 0 ip 00007f1049dc97ab sp 00007fffc9b06970 error 4 in libexiv2.so.0.28.0[7f1049cd2000+17b000] likely on CPU 4 (core 5, socket 0)
Comment 1 cenon.delrosario 2023-06-09 07:34:49 UTC
Created attachment 159558 [details]
Test image causing segfaults
Comment 2 Nicolas Fella 2023-06-14 19:55:39 UTC
#0  0x00007ffff653cd97 in std::__cxx11::list<Exiv2::Exifdatum, std::allocator<Exiv2::Exifdatum> >::begin (this=0x0) at /usr/include/c++/13/bits/stl_list.h:1033
#1  0x00007ffff666bfe8 in Exiv2::ExifData::findKey (this=0x0, key=...) at /home/nico/workspace/exiv2/src/exif.cpp:457
#2  0x00007ffff657d5af in Exiv2::Internal::getModel (metadata=0x0, val="") at /home/nico/workspace/exiv2/src/sonymn_int.cpp:641
#3  0x00007ffff657efba in Exiv2::Internal::SonyMakerNote::printFocusMode2 (os=..., value=..., metadata=0x0) at /home/nico/workspace/exiv2/src/sonymn_int.cpp:838
#4  0x00007ffff6669f0d in Exiv2::Exifdatum::write (this=0x7fff9c0b4c20, os=..., pMetadata=0x0) at /home/nico/workspace/exiv2/src/exif.cpp:187
#5  0x00007ffff7d10e91 in Exiv2::operator<< (os=..., md=...) at /home/nico/kde/usr/include/exiv2/metadatum.hpp:277
#6  0x00007ffff7d12ab2 in Gwenview::ImageMetaInfoModelPrivate::fillExivGroup<Exiv2::ExifData, std::_List_const_iterator<Exiv2::Exifdatum> > (this=0xcbbeb0, parent=..., group=0xcafc10, container=...)
    at /home/nico/kde/src/gwenview/lib/imagemetainfomodel.cpp:282
#7  0x00007ffff7d10136 in Gwenview::ImageMetaInfoModel::setExiv2Image (this=0x7fffdc0022d0, image=0x7fff9c001960) at /home/nico/kde/src/gwenview/lib/imagemetainfomodel.cpp:441
#8  0x00007ffff7cbfc49 in Gwenview::Document::setExiv2Image (this=0xcbc3c0, image=std::unique_ptr<Exiv2::Image> = {...}) at /home/nico/kde/src/gwenview/lib/document/document.cpp:388
#9  0x00007ffff7cbce1d in Gwenview::AbstractDocumentImpl::setDocumentExiv2Image (this=0xcc0ac0, image=std::unique_ptr<Exiv2::Image> = {...}) at /home/nico/kde/src/gwenview/lib/document/abstractdocumentimpl.cpp:81
#10 0x00007ffff7cc9665 in Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded (this=0xcc0ac0) at /home/nico/kde/src/gwenview/lib/document/loadingdocumentimpl.cpp:497
#11 0x00007ffff7cce7ce in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Gwenview::LoadingDocumentImpl::*)()>::call(void (Gwenview::LoadingDocumentImpl::*)(), Gwenview::LoadingDocumentImpl*, void**) (
    f=(void (Gwenview::LoadingDocumentImpl::*)(Gwenview::LoadingDocumentImpl * const)) 0x7ffff7cc94f2 <Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded()>, o=0xcc0ac0, arg=0x7fffffffcd50)
    at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#12 0x00007ffff7cce050 in QtPrivate::FunctionPointer<void (Gwenview::LoadingDocumentImpl::*)()>::call<QtPrivate::List<>, void>(void (Gwenview::LoadingDocumentImpl::*)(), Gwenview::LoadingDocumentImpl*, void**) (
    f=(void (Gwenview::LoadingDocumentImpl::*)(Gwenview::LoadingDocumentImpl * const)) 0x7ffff7cc94f2 <Gwenview::LoadingDocumentImpl::slotMetaInfoLoaded()>, o=0xcc0ac0, arg=0x7fffffffcd50)
    at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#13 0x00007ffff7ccd955 in QtPrivate::QSlotObject<void (Gwenview::LoadingDocumentImpl::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0xcc0240, r=0xcc0ac0, 
    a=0x7fffffffcd50, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#14 0x00007ffff44e8651 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffcd50, r=<optimized out>, this=0xcc0240) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0xcb7388, signal_index=4, argv=0x7fffffffcd50) at kernel/qobject.cpp:3923
#16 0x00007ffff44e34d7 in QMetaObject::activate (sender=<optimized out>, m=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3983
#17 0x00007ffff42ff5d5 in QFutureWatcherBase::event (this=<optimized out>, event=0x7fff9c14ffd0) at thread/qfuturewatcher.cpp:334
#18 0x00007ffff53aeb75 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0xcb7388, e=0x7fff9c14ffd0) at kernel/qapplication.cpp:3640
#19 0x00007ffff44b3d48 in QCoreApplication::notifyInternal2 (receiver=0xcb7388, event=0x7fff9c14ffd0) at kernel/qcoreapplication.cpp:1064
#20 0x00007ffff44b3f62 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#21 0x00007ffff44b71f5 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x4fd480) at kernel/qcoreapplication.cpp:1821
#22 0x00007ffff44b74ad in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#23 0x00007ffff4506e2f in postEventSourceDispatch (s=0x5664e0) at kernel/qeventdispatcher_glib.cpp:277
#24 0x00007ffff318b39c in g_main_dispatch (context=0x7fffdc000ee0) at ../glib/gmain.c:3460
#25 g_main_context_dispatch (context=0x7fffdc000ee0) at ../glib/gmain.c:4200
#26 0x00007ffff31e9438 in g_main_context_iterate.isra.0 (context=0x7fffdc000ee0, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276
#27 0x00007ffff3188a23 in g_main_context_iteration (context=0x7fffdc000ee0, may_block=1) at ../glib/gmain.c:4343
#28 0x00007ffff4506919 in QEventDispatcherGlib::processEvents (this=0x566a20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#29 0x00007ffff44b270b in QEventLoop::exec (this=this@entry=0x7fffffffd1c0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#30 0x00007ffff44ba99b in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#31 0x000000000047a3b1 in main (argc=2, argv=0x7fffffffd4d8) at /home/nico/kde/src/gwenview/app/main.cpp:213
Comment 3 Nicolas Fella 2023-06-14 19:56:52 UTC
Slightly different variant of https://bugs.kde.org/show_bug.cgi?id=470880 and a regression in exiv 0.28
Comment 4 Nicolas Fella 2023-06-17 18:37:08 UTC
*** Bug 471167 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2023-06-21 09:38:08 UTC
*** Bug 471228 has been marked as a duplicate of this bug. ***
Comment 6 Nicolas Fella 2023-06-21 09:38:30 UTC
*** Bug 471232 has been marked as a duplicate of this bug. ***
Comment 7 Antonio Rojas 2023-06-22 05:57:41 UTC
*** Bug 471308 has been marked as a duplicate of this bug. ***
Comment 8 Filip 2024-10-06 17:02:50 UTC
*** Bug 494212 has been marked as a duplicate of this bug. ***