Bug 481837

Summary: Gwenview crashes when quickly double rotating a jpg
Product: [Applications] gwenview Reporter: simonpatp
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: nate, rmchiocchio
Priority: NOR Keywords: drkonqi
Version: 22.12.3   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description simonpatp 2024-02-25 22:01:08 UTC
Application: gwenview (22.12.3)

Qt Version: 5.15.8
Frameworks Version: 5.103.0
Operating System: Linux 6.6.15-amd64 x86_64
Windowing System: X11
Distribution: Debian GNU/Linux 12 (bookworm)
DrKonqi: 5.27.5 [KCrashBackend]

-- Information about the crash:
Default configuration, Tried on multiple jpgs, and quickly rotating twice will cause a crash 100% of the time

The crash can be reproduced every time.

-- Backtrace:
Application: Gwenview (gwenview), signal: Segmentation fault

[KCrash Handler]
#6  __memcpy_avx512_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:664
#7  0x00007f961418a277 in memcpy (__len=4168, __src=0x7f95d0b13788, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29
#8  QImage::copy (this=0x563b4a33c560, r=...) at image/qimage.cpp:1239
#9  0x00007f9615ee024a in ?? () from /lib/x86_64-linux-gnu/libgwenviewlib.so.5
#10 0x00007f9614ca2121 in QGraphicsScenePrivate::draw (this=this@entry=0x563b49eb1bb0, item=item@entry=0x563b4a543170, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x563b4a5560c0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:4981
#11 0x00007f9614ca297a in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x563b49eb1bb0, item=0x563b4a543170, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=<optimized out>, widget@entry=0x563b49f94c30, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4873
#12 0x00007f9614ca1e7b in QGraphicsScenePrivate::draw (this=this@entry=0x563b49eb1bb0, item=item@entry=0x563b4a55aa30, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x7f96000028a0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:5013
#13 0x00007f9614ca297a in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x563b49eb1bb0, item=0x563b4a55aa30, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=<optimized out>, widget@entry=0x563b49f94c30, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4873
#14 0x00007f9614ca1e7b in QGraphicsScenePrivate::draw (this=0x563b49eb1bb0, item=0x563b4a35bb10, painter=0x7ffe2a59ec50, viewTransform=<optimized out>, transformPtr=<optimized out>, exposedRegion=<optimized out>, widget=<optimized out>, opacity=<optimized out>, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:5013
#15 0x00007f9614c668a4 in QGraphicsItemEffectSourcePrivate::draw (this=0x563b4a3599c0, painter=0x7ffe2a59ec50) at graphicsview/qgraphicsitem.cpp:11331
#16 0x00007f9614d0c2d4 in QGraphicsEffectSource::draw (this=0x563b4a354730, painter=0x7ffe2a59ec50) at effects/qgraphicseffect_p.h:90
#17 0x00007f9614ca2d73 in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x563b49eb1bb0, item=<optimized out>, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=<optimized out>, widget@entry=0x563b49f94c30, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4867
#18 0x00007f9614ca33a2 in QGraphicsScenePrivate::drawItems (this=this@entry=0x563b49eb1bb0, painter=painter@entry=0x7ffe2a59ec50, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x563b4a027260, widget=0x563b49f94c30) at graphicsview/qgraphicsscene.cpp:4735
#19 0x00007f9614cc721f in QGraphicsView::paintEvent (this=0x563b4a01c740, event=<optimized out>) at ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:307
#20 0x00007f96149a4db8 in QWidget::event (this=this@entry=0x563b4a01c740, event=event@entry=0x7ffe2a59efd0) at kernel/qwidget.cpp:9044
#21 0x00007f9614a5048e in QFrame::event (this=0x563b4a01c740, e=0x7ffe2a59efd0) at widgets/qframe.cpp:550
#22 0x00007f9613cb147b in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x563b49f94c30, event=event@entry=0x7ffe2a59efd0) at kernel/qcoreapplication.cpp:1190
#23 0x00007f9614962f9e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x563b49f94c30, e=0x7ffe2a59efd0) at kernel/qapplication.cpp:3634
#24 0x00007f9613cb16f8 in QCoreApplication::notifyInternal2 (receiver=0x563b49f94c30, event=0x7ffe2a59efd0) at kernel/qcoreapplication.cpp:1064
#25 0x00007f9613cb18ce in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#26 0x00007f961499d0d5 in QWidgetPrivate::sendPaintEvent (this=this@entry=0x563b49f94d30, toBePainted=...) at kernel/qwidget.cpp:5478
#27 0x00007f961499d9d1 in QWidgetPrivate::drawWidget (this=this@entry=0x563b49f94d30, pdev=0x563b4a564370, rgn=..., offset=..., flags=flags@entry=..., sharedPainter=sharedPainter@entry=0x0, repaintManager=<optimized out>) at kernel/qwidget.cpp:5428
#28 0x00007f9614974261 in QWidgetRepaintManager::paintAndFlush (this=0x563b4a339a10) at kernel/qwidgetrepaintmanager.cpp:1016
#29 0x00007f96149a5078 in QWidget::event (this=0x563b49d75570, event=0x563b4a57f760) at kernel/qwidget.cpp:8989
#30 0x00007f961564a307 in KXmlGuiWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#31 0x00007f9614962fae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x563b49d75570, e=0x563b4a57f760) at kernel/qapplication.cpp:3640
#32 0x00007f9613cb16f8 in QCoreApplication::notifyInternal2 (receiver=0x563b49d75570, event=0x563b4a57f760) at kernel/qcoreapplication.cpp:1064
#33 0x00007f9613cb18be in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#34 0x00007f9613cb4681 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x563b49d75570, event_type=77, data=0x563b499d7980) at kernel/qcoreapplication.cpp:1821
#35 0x00007f9613cb4b08 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#36 0x00007f9614c94a83 in QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=<optimized out>) at ../../include/QtWidgets/5.15.8/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:191
#37 QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=0x563b4a026da0) at ../../include/QtWidgets/5.15.8/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:186
#38 QGraphicsScenePrivate::_q_processDirtyItems (this=0x563b49eb1bb0) at graphicsview/qgraphicsscene.cpp:516
#39 0x00007f9613cdd6f0 in QObject::event (this=0x563b4a01c940, e=0x563b4a580b80) at kernel/qobject.cpp:1347
#40 0x00007f9614962fae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x563b4a01c940, e=0x563b4a580b80) at kernel/qapplication.cpp:3640
#41 0x00007f9613cb16f8 in QCoreApplication::notifyInternal2 (receiver=0x563b4a01c940, event=0x563b4a580b80) at kernel/qcoreapplication.cpp:1064
#42 0x00007f9613cb18be in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#43 0x00007f9613cb4681 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x563b499d7980) at kernel/qcoreapplication.cpp:1821
#44 0x00007f9613cb4b08 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#45 0x00007f9613d0a153 in postEventSourceDispatch (s=0x563b49b3a810) at kernel/qeventdispatcher_glib.cpp:277
#46 0x00007f961171e7a9 in g_main_dispatch (context=0x7f9608005010) at ../../../glib/gmain.c:3454
#47 g_main_context_dispatch (context=context@entry=0x7f9608005010) at ../../../glib/gmain.c:4172
#48 0x00007f961171ea38 in g_main_context_iterate (context=context@entry=0x7f9608005010, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4248
#49 0x00007f961171eacc in g_main_context_iteration (context=0x7f9608005010, may_block=1) at ../../../glib/gmain.c:4313
#50 0x00007f9613d09836 in QEventDispatcherGlib::processEvents (this=0x563b49b3fa40, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#51 0x00007f9613cb017b in QEventLoop::exec (this=this@entry=0x7ffe2a59fa90, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#52 0x00007f9613cb82d6 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#53 0x0000563b482b150c in ?? ()
#54 0x00007f961384624a in __libc_start_call_main (main=main@entry=0x563b482b1070, argc=argc@entry=2, argv=argv@entry=0x7ffe2a59fce8) at ../sysdeps/nptl/libc_start_call_main.h:58
#55 0x00007f9613846305 in __libc_start_main_impl (main=0x563b482b1070, argc=2, argv=0x7ffe2a59fce8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe2a59fcd8) at ../csu/libc-start.c:360
#56 0x0000563b482b16c1 in ?? ()
[Inferior 1 (process 2023574) detached]

The reporter indicates this bug may be a duplicate of or related to bug 468273, bug 456549, bug 450095, bug 439697, bug 438678, bug 436894.

Reported using DrKonqi
Comment 1 Nate Graham 2024-02-26 22:27:01 UTC

*** This bug has been marked as a duplicate of bug 439697 ***
Comment 2 Rob Chiocchio 2024-04-28 18:10:13 UTC
Created attachment 168979 [details]
New crash information added by DrKonqi

gwenview (22.12.3) using Qt 5.15.8

The viewer crashed when trying to rotate a JPEG twice in a quick time period. I am able to recreate the issue fairly consistently by rotating the image counter-clockwise and then clockwise in quick succession.

-- Backtrace (Reduced):
#6  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:273
#7  0x00007ff00c18a277 in memcpy (__len=4800, __src=0x7fef9c7592e0, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29
#8  QImage::copy (this=0x55a752e23540, r=...) at image/qimage.cpp:1239
[...]
#10 0x00007ff00cca2121 in QGraphicsScenePrivate::draw (this=this@entry=0x55a752cd0550, item=item@entry=0x55a75326e150, painter=painter@entry=0x7ffccae18420, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x55a752d4a6b0, exposedRegion=exposedRegion@entry=0x55a752e74910, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:4981
#11 0x00007ff00cca297a in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x55a752cd0550, item=0x55a75326e150, painter=painter@entry=0x7ffccae18420, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x55a752e74910, widget=<optimized out>, widget@entry=0x55a752ea76e0, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4873