Bug 359736 - Crash when reloading SVG image
Summary: Crash when reloading SVG image
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 16.12.0
Platform: Ubuntu Linux
: NOR crash with 20 votes (vote)
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords: drkonqi
: 330198 345272 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-24 02:25 UTC by Jesse Talavera-Greenberg
Modified: 2018-04-15 07:52 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.04.1


Attachments
New crash information added by DrKonqi (7.51 KB, text/plain)
2016-03-16 22:07 UTC, sedrubal
Details
Sample file that crashes gwenview (132.98 KB, image/svg+xml)
2017-01-03 19:10 UTC, Łukasz Żarnowiecki
Details
New crash information added by DrKonqi (11.94 KB, text/plain)
2017-06-17 20:24 UTC, Anton Yablokov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Talavera-Greenberg 2016-02-24 02:25:01 UTC
Application: gwenview (15.08.2)

Qt Version: 5.4.2
Operating System: Linux 4.2.0-30-generic x86_64
Distribution: Ubuntu 15.10

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

I had updated an SVG image on my hard drive through external means, and Gwenview crashed almost immediately thereafter.

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

Thread 2 (Thread 0x7fa33a571700 (LWP 8623)):
#0  0x00007fa34b0ee88d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fa3443e2bd2 in poll (__timeout=-1, __nfds=1, __fds=0x7fa33a570c80) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x102a940, cond=cond@entry=0x102a980, vector=vector@entry=0x0, count=count@entry=0x0) at ../../src/xcb_conn.c:459
#3  0x00007fa3443e474f in xcb_wait_for_event (c=0x102a940) at ../../src/xcb_in.c:623
#4  0x00007fa33cb14a39 in QXcbEventReader::run (this=0x1038ad0) at qxcbconnection.cpp:1105
#5  0x00007fa34b7e12be in QThreadPrivate::start (arg=0x1038ad0) at thread/qthread_unix.cpp:337
#6  0x00007fa3467f86aa in start_thread (arg=0x7fa33a571700) at pthread_create.c:333
#7  0x00007fa34b0f9e9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fa33ce6e840 (LWP 8590)):
[KCrash Handler]
#6  0x00007fa349a77887 in QSvgTinyDocument::draw(QPainter*, QRectF const&) () from /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5
#7  0x00007fa349a7a09e in QGraphicsSvgItem::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () from /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5
#8  0x00007fa34ca5a412 in _q_paintItem (item=item@entry=0x14313b0, painter=painter@entry=0x7ffde30c08a0, option=option@entry=0x1445e18, widget=widget@entry=0x0, useWindowOpacity=useWindowOpacity@entry=false, painterStateProtection=painterStateProtection@entry=true) at graphicsview/qgraphicsscene.cpp:4226
#9  0x00007fa34ca6a7ee in _q_paintIntoCache (pix=pix@entry=0x7ffde30c0ac0, item=item@entry=0x14313b0, pixmapExposed=..., itemToPixmap=..., renderHints=..., option=option@entry=0x1445e18, painterStateProtection=true) at graphicsview/qgraphicsscene.cpp:4294
#10 0x00007fa34ca6c1d7 in QGraphicsScenePrivate::drawItemHelper (this=this@entry=0x1445c00, item=item@entry=0x14313b0, painter=painter@entry=0x7ffde30c1960, option=option@entry=0x1445e18, widget=widget@entry=0x146b3c0, painterStateProtection=<optimized out>) at graphicsview/qgraphicsscene.cpp:4615
#11 0x00007fa34ca6d004 in QGraphicsScenePrivate::draw (this=this@entry=0x1445c00, item=item@entry=0x14313b0, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x1cbfbe0, exposedRegion=<optimized out>, widget=0x146b3c0, opacity=opacity@entry=1, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true) at graphicsview/qgraphicsscene.cpp:4908
#12 0x00007fa34ca6df23 in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x1445c00, item=0x14313b0, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x14df308, widget=widget@entry=0x146b3c0, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4799
#13 0x00007fa34ca6cc0d in QGraphicsScenePrivate::draw (this=this@entry=0x1445c00, item=item@entry=0x1a25e50, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x1a3d460, exposedRegion=<optimized out>, widget=0x146b3c0, opacity=opacity@entry=1, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true) at graphicsview/qgraphicsscene.cpp:4938
#14 0x00007fa34ca6df23 in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x1445c00, item=0x1a25e50, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x14df308, widget=widget@entry=0x146b3c0, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4799
#15 0x00007fa34ca6cc0d in QGraphicsScenePrivate::draw (this=this@entry=0x1445c00, item=item@entry=0x150c810, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, transformPtr=transformPtr@entry=0x14036e0, exposedRegion=<optimized out>, widget=0x146b3c0, opacity=opacity@entry=1, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true) at graphicsview/qgraphicsscene.cpp:4938
#16 0x00007fa34ca6df23 in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x1445c00, item=0x150c810, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x14df308, widget=widget@entry=0x146b3c0, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4799
#17 0x00007fa34ca6e44a in QGraphicsScenePrivate::drawItems (this=0x1445c00, painter=painter@entry=0x7ffde30c1960, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x14df308, widget=0x146b3c0) at graphicsview/qgraphicsscene.cpp:4660
#18 0x00007fa34ca90247 in QGraphicsView::paintEvent (this=0x14a6510, event=<optimized out>) at graphicsview/qgraphicsview.cpp:3530
#19 0x00007fa34c788188 in QWidget::event (this=this@entry=0x14a6510, event=event@entry=0x7ffde30c1ef0) at kernel/qwidget.cpp:9023
#20 0x00007fa34c88276e in QFrame::event (this=0x14a6510, e=0x7ffde30c1ef0) at widgets/qframe.cpp:526
#21 0x00007fa34ca8edd3 in QGraphicsView::viewportEvent (this=0x14a6510, event=0x7ffde30c1ef0) at graphicsview/qgraphicsview.cpp:2960
#22 0x00007fa34b9c0d0c in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x100f550, receiver=receiver@entry=0x146b3c0, event=event@entry=0x7ffde30c1ef0) at kernel/qcoreapplication.cpp:1031
#23 0x00007fa34c745b6c in QApplicationPrivate::notify_helper (this=this@entry=0x100f550, receiver=receiver@entry=0x146b3c0, e=e@entry=0x7ffde30c1ef0) at kernel/qapplication.cpp:3716
#24 0x00007fa34c74b230 in QApplication::notify (this=0x7ffde30c2fb0, receiver=0x146b3c0, e=0x7ffde30c1ef0) at kernel/qapplication.cpp:3503
#25 0x00007fa34b9c0f1b in QCoreApplication::notifyInternal (this=0x7ffde30c2fb0, receiver=receiver@entry=0x146b3c0, event=event@entry=0x7ffde30c1ef0) at kernel/qcoreapplication.cpp:935
#26 0x00007fa34c781689 in QCoreApplication::sendSpontaneousEvent (event=0x7ffde30c1ef0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#27 QWidgetPrivate::sendPaintEvent (this=this@entry=0x146b480, toBePainted=...) at kernel/qwidget.cpp:5608
#28 0x00007fa34c781cd1 in QWidgetPrivate::drawWidget (this=this@entry=0x146b480, pdev=0x1a02ec0, rgn=..., offset=..., flags=36, sharedPainter=sharedPainter@entry=0x0, backingStore=0x13d1d40) at kernel/qwidget.cpp:5548
#29 0x00007fa34c752b66 in QWidgetBackingStore::doSync (this=this@entry=0x13d1d40) at kernel/qwidgetbackingstore.cpp:1224
#30 0x00007fa34c752dac in QWidgetBackingStore::sync (this=0x13d1d40) at kernel/qwidgetbackingstore.cpp:1036
#31 0x00007fa34c77196f in QWidgetPrivate::syncBackingStore (this=0x110c3d0) at kernel/qwidget.cpp:1894
#32 0x00007fa34c787f88 in QWidget::event (this=this@entry=0x110bc50, event=event@entry=0x1495a50) at kernel/qwidget.cpp:8962
#33 0x00007fa34c89939b in QMainWindow::event (this=0x110bc50, event=0x1495a50) at widgets/qmainwindow.cpp:1495
#34 0x00007fa34e020177 in KMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#35 0x00007fa34e0585c5 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#36 0x00007fa34c745b8c in QApplicationPrivate::notify_helper (this=this@entry=0x100f550, receiver=receiver@entry=0x110bc50, e=e@entry=0x1495a50) at kernel/qapplication.cpp:3720
#37 0x00007fa34c74b230 in QApplication::notify (this=0x7ffde30c2fb0, receiver=0x110bc50, e=0x1495a50) at kernel/qapplication.cpp:3503
#38 0x00007fa34b9c0f1b in QCoreApplication::notifyInternal (this=0x7ffde30c2fb0, receiver=0x110bc50, event=event@entry=0x1495a50) at kernel/qcoreapplication.cpp:935
#39 0x00007fa34b9c3057 in QCoreApplication::sendEvent (event=0x1495a50, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228
#40 QCoreApplicationPrivate::sendPostedEvents (receiver=0x110bc50, event_type=event_type@entry=77, data=0x10041c0) at kernel/qcoreapplication.cpp:1552
#41 0x00007fa34b9c3588 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=event_type@entry=77) at kernel/qcoreapplication.cpp:1410
#42 0x00007fa34ca5fe1a in QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=<optimized out>) at ../../include/QtWidgets/5.4.2/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:194
#43 QGraphicsScenePrivate::_q_processDirtyItems (this=0x1445c00) at graphicsview/qgraphicsscene.cpp:501
#44 0x00007fa34ca657a9 in QGraphicsScene::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qgraphicsscene.cpp:181
#45 0x00007fa34b9f2651 in QObject::event (this=this@entry=0x14a67a0, e=e@entry=0x1ce7810) at kernel/qobject.cpp:1245
#46 0x00007fa34ca7386b in QGraphicsScene::event (this=0x14a67a0, event=0x1ce7810) at graphicsview/qgraphicsscene.cpp:3471
#47 0x00007fa34c745b8c in QApplicationPrivate::notify_helper (this=this@entry=0x100f550, receiver=receiver@entry=0x14a67a0, e=e@entry=0x1ce7810) at kernel/qapplication.cpp:3720
#48 0x00007fa34c74b230 in QApplication::notify (this=0x7ffde30c2fb0, receiver=0x14a67a0, e=0x1ce7810) at kernel/qapplication.cpp:3503
#49 0x00007fa34b9c0f1b in QCoreApplication::notifyInternal (this=0x7ffde30c2fb0, receiver=0x14a67a0, event=event@entry=0x1ce7810) at kernel/qcoreapplication.cpp:935
#50 0x00007fa34b9c3057 in QCoreApplication::sendEvent (event=0x1ce7810, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228
#51 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x10041c0) at kernel/qcoreapplication.cpp:1552
#52 0x00007fa34b9c3588 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1410
#53 0x00007fa34ba17e73 in postEventSourceDispatch (s=0x1061b60) at kernel/qeventdispatcher_glib.cpp:271
#54 0x00007fa3462d7ff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007fa3462d8250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007fa3462d82fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#57 0x00007fa34ba1827f in QEventDispatcherGlib::processEvents (this=0x1069d10, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#58 0x00007fa34b9be75a in QEventLoop::exec (this=this@entry=0x7ffde30c2ea0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#59 0x00007fa34b9c62cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#60 0x000000000043f470 in main ()

Possible duplicates by query: bug 345272.

Reported using DrKonqi
Comment 1 sedrubal 2016-03-16 22:07:27 UTC
Created attachment 97930 [details]
New crash information added by DrKonqi

gwenview (4.14.0 pre) on KDE Platform 4.14.17 using Qt 4.8.7

- What I was doing when the application crashed:

I changed the displayed svg and moved my cursor over gwenview.

-- Backtrace (Reduced):
#6  0x00007f577ee77267 in QSvgTinyDocument::draw(QPainter*, QRectF const&) () at /lib64/libQtSvg.so.4
#7  0x00007f577ee7a03e in QGraphicsSvgItem::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () at /lib64/libQtSvg.so.4
#10 0x00007f577f8c38a6 in QGraphicsScenePrivate::drawItemHelper(QGraphicsItem*, QPainter*, QStyleOptionGraphicsItem const*, QWidget*, bool) () at /lib64/libQtGui.so.4
#11 0x00007f577f8c459c in QGraphicsScenePrivate::draw(QGraphicsItem*, QPainter*, QTransform const*, QTransform const*, QRegion*, QWidget*, double, QTransform const*, bool, bool) () at /lib64/libQtGui.so.4
#12 0x00007f577f8c5121 in QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem*, QPainter*, QTransform const*, QRegion*, QWidget*, double, QTransform const*) () at /lib64/libQtGui.so.4
Comment 2 Łukasz Żarnowiecki 2017-01-03 19:09:30 UTC
Application: Gwenview (gwenview), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe02c2da8c0 (LWP 9509))]

Thread 7 (Thread 0x7fe001c87700 (LWP 9516)):
#0  0x00007fe020c1010f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe00764645b in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007fe0076462b7 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 6 (Thread 0x7fe002488700 (LWP 9515)):
#0  0x00007fe020c1010f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe00764645b in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007fe0076462b7 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7fe002c89700 (LWP 9514)):
#0  0x00007fe020c1010f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe00764645b in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007fe0076462b7 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fe00348a700 (LWP 9513)):
#0  0x00007fe020c1010f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe00764645b in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007fe0076462b7 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fe003e90700 (LWP 9512)):
#0  0x00007fe020c1010f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe00764645b in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007fe0076462b7 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fe00ec3e700 (LWP 9511)):
#0  0x00007fe026c2348d in poll () from /usr/lib/libc.so.6
#1  0x00007fe01f5bc786 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fe01f5bc89c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fe0275462db in QEventDispatcherGlib::processEvents (this=0x7fe0080008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fe0274efd3a in QEventLoop::exec (this=this@entry=0x7fe00ec3dcd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007fe027312063 in QThread::exec (this=this@entry=0x7fe026b42d20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#6  0x00007fe0268cede5 in QDBusConnectionManager::run (this=0x7fe026b42d20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#7  0x00007fe027316cf8 in QThreadPrivate::start (arg=0x7fe026b42d20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#8  0x00007fe020c0a454 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007fe026c2c7df in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fe02c2da8c0 (LWP 9509)):
[KCrash Handler]
#6  0x00007fe0249d0bf7 in QSvgTinyDocument::draw(QPainter*, QRectF const&) () from /usr/lib/libQt5Svg.so.5
#7  0x00007fe0249d33de in QGraphicsSvgItem::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () from /usr/lib/libQt5Svg.so.5
#8  0x00007fe028edeff2 in _q_paintItem (item=item@entry=0x2807640, painter=painter@entry=0x7ffc3904e3a0, option=option@entry=0x26953b8, widget=widget@entry=0x270ec20, useWindowOpacity=<optimized out>, painterStateProtection=painterStateProtection@entry=true) at graphicsview/qgraphicsscene.cpp:4280
#9  0x00007fe028eef214 in QGraphicsScenePrivate::drawItemHelper (this=this@entry=0x26951a0, item=item@entry=0x2807640, painter=painter@entry=0x7ffc3904e3a0, option=option@entry=0x26953b8, widget=widget@entry=0x270ec20, painterStateProtection=<optimized out>) at graphicsview/qgraphicsscene.cpp:4542
#10 0x00007fe028ef10f4 in QGraphicsScenePrivate::draw (this=this@entry=0x26951a0, item=item@entry=0x2807640, painter=painter@entry=0x7ffc3904e3a0, viewTransform=<optimized out>, transformPtr=transformPtr@entry=0x29e67f0, exposedRegion=<optimized out>, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:4963
#11 0x00007fe028ef1cff in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x26951a0, item=0x2807640, painter=painter@entry=0x7ffc3904e3a0, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x26be4b0, widget=<optimized out>, widget@entry=0x270ec20, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4854
#12 0x00007fe028ef0f2c in QGraphicsScenePrivate::draw (this=this@entry=0x26951a0, item=item@entry=0x314e340, painter=painter@entry=0x7ffc3904e3a0, viewTransform=<optimized out>, transformPtr=transformPtr@entry=0x3145360, exposedRegion=<optimized out>, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:4993
#13 0x00007fe028ef1cff in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x26951a0, item=0x314e340, painter=painter@entry=0x7ffc3904e3a0, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x26be4b0, widget=<optimized out>, widget@entry=0x270ec20, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4854
#14 0x00007fe028ef0f2c in QGraphicsScenePrivate::draw (this=this@entry=0x26951a0, item=item@entry=0x28aa040, painter=painter@entry=0x7ffc3904e3a0, viewTransform=<optimized out>, transformPtr=transformPtr@entry=0x28ba950, exposedRegion=<optimized out>, widget=<optimized out>, opacity=opacity@entry=1, effectTransform=<optimized out>, wasDirtyParentSceneTransform=<optimized out>, drawItem=<optimized out>) at graphicsview/qgraphicsscene.cpp:4993
#15 0x00007fe028ef1cff in QGraphicsScenePrivate::drawSubtreeRecursive (this=this@entry=0x26951a0, item=0x28aa040, painter=painter@entry=0x7ffc3904e3a0, viewTransform=viewTransform@entry=0x0, exposedRegion=exposedRegion@entry=0x26be4b0, widget=<optimized out>, widget@entry=0x270ec20, parentOpacity=parentOpacity@entry=1, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4854
#16 0x00007fe028ef23aa in QGraphicsScenePrivate::drawItems (this=0x26951a0, painter=painter@entry=0x7ffc3904e3a0, viewTransform=0x0, exposedRegion=exposedRegion@entry=0x26be4b0, widget=0x270ec20) at graphicsview/qgraphicsscene.cpp:4715
#17 0x00007fe028f1418a in QGraphicsView::paintEvent (this=<optimized out>, event=<optimized out>) at graphicsview/qgraphicsview.cpp:3550
#18 0x00007fe028c219b8 in QWidget::event (this=this@entry=0x2716490, event=event@entry=0x7ffc3904e950) at kernel/qwidget.cpp:9161
#19 0x00007fe028d09e1e in QFrame::event (this=0x2716490, e=0x7ffc3904e950) at widgets/qframe.cpp:550
#20 0x00007fe028f12c9b in QGraphicsView::viewportEvent (this=0x2716490, event=0x7ffc3904e950) at graphicsview/qgraphicsview.cpp:2973
#21 0x00007fe0274f1641 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x270ec20, event=event@entry=0x7ffc3904e950) at kernel/qcoreapplication.cpp:1099
#22 0x00007fe028bda335 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x270ec20, e=0x7ffc3904e950) at kernel/qapplication.cpp:3795
#23 0x00007fe028be1ad1 in QApplication::notify (this=0x7ffc3904fab0, receiver=0x270ec20, e=0x7ffc3904e950) at kernel/qapplication.cpp:3556
#24 0x00007fe0274f18e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x270ec20, event=event@entry=0x7ffc3904e950) at kernel/qcoreapplication.cpp:988
#25 0x00007fe028c1a73a in QCoreApplication::sendSpontaneousEvent (event=0x7ffc3904e950, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#26 QWidgetPrivate::sendPaintEvent (this=this@entry=0x270ec60, toBePainted=...) at kernel/qwidget.cpp:5705
#27 0x00007fe028c1ad89 in QWidgetPrivate::drawWidget (this=this@entry=0x270ec60, pdev=0x353fc30, rgn=..., offset=..., flags=flags@entry=36, sharedPainter=sharedPainter@entry=0x0, backingStore=<optimized out>) at kernel/qwidget.cpp:5645
#28 0x00007fe028bea69e in QWidgetBackingStore::doSync (this=this@entry=0x2890eb0) at kernel/qwidgetbackingstore.cpp:1394
#29 0x00007fe028bea8c7 in QWidgetBackingStore::sync (this=0x2890eb0) at kernel/qwidgetbackingstore.cpp:1179
#30 0x00007fe028c0973f in QWidgetPrivate::syncBackingStore (this=0x25a5390) at kernel/qwidget.cpp:1962
#31 0x00007fe028c21a88 in QWidget::event (this=this@entry=0x25a5200, event=event@entry=0x34f9280) at kernel/qwidget.cpp:9100
#32 0x00007fe028d20d4b in QMainWindow::event (this=0x25a5200, event=0x34f9280) at widgets/qmainwindow.cpp:1543
#33 0x00007fe02a21e00a in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#34 0x00007fe02a26fa85 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#35 0x00007fe028bda35c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x25a5200, e=0x34f9280) at kernel/qapplication.cpp:3799
#36 0x00007fe028be1ad1 in QApplication::notify (this=0x7ffc3904fab0, receiver=0x25a5200, e=0x34f9280) at kernel/qapplication.cpp:3556
#37 0x00007fe0274f18e0 in QCoreApplication::notifyInternal2 (receiver=0x25a5200, event=event@entry=0x34f9280) at kernel/qcoreapplication.cpp:988
#38 0x00007fe0274f406d in QCoreApplication::sendEvent (event=0x34f9280, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#39 QCoreApplicationPrivate::sendPostedEvents (receiver=0x25a5200, event_type=event_type@entry=77, data=0x24a6660) at kernel/qcoreapplication.cpp:1649
#40 0x00007fe0274f44d8 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=event_type@entry=77) at kernel/qcoreapplication.cpp:1503
#41 0x00007fe028ee4302 in QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=<optimized out>) at ../../include/QtWidgets/5.7.1/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:202
#42 QGraphicsScenePrivate::_q_processDirtyItems (this=0x26951a0) at graphicsview/qgraphicsscene.cpp:508
#43 0x00007fe028ee9b59 in QGraphicsScene::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qgraphicsscene.cpp:182
#44 0x00007fe02751df29 in QObject::event (this=this@entry=0x270fbd0, e=e@entry=0x35048f0) at kernel/qobject.cpp:1263
#45 0x00007fe028ef66eb in QGraphicsScene::event (this=0x270fbd0, event=0x35048f0) at graphicsview/qgraphicsscene.cpp:3523
#46 0x00007fe028bda35c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x270fbd0, e=0x35048f0) at kernel/qapplication.cpp:3799
#47 0x00007fe028be1ad1 in QApplication::notify (this=0x7ffc3904fab0, receiver=0x270fbd0, e=0x35048f0) at kernel/qapplication.cpp:3556
#48 0x00007fe0274f18e0 in QCoreApplication::notifyInternal2 (receiver=0x270fbd0, event=event@entry=0x35048f0) at kernel/qcoreapplication.cpp:988
#49 0x00007fe0274f406d in QCoreApplication::sendEvent (event=0x35048f0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#50 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x24a6660) at kernel/qcoreapplication.cpp:1649
#51 0x00007fe0274f44d8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#52 0x00007fe027545eb3 in postEventSourceDispatch (s=0x2505b00) at kernel/qeventdispatcher_glib.cpp:276
#53 0x00007fe01f5bc587 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#54 0x00007fe01f5bc7f0 in ?? () from /usr/lib/libglib-2.0.so.0
#55 0x00007fe01f5bc89c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#56 0x00007fe0275462bf in QEventDispatcherGlib::processEvents (this=0x2508b80, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#57 0x00007fe0274efd3a in QEventLoop::exec (this=this@entry=0x7ffc3904f970, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#58 0x00007fe0274f823c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#59 0x0000000000432289 in ?? ()
#60 0x00007fe026b64291 in __libc_start_main () from /usr/lib/libc.so.6
#61 0x000000000043283a in _start ()
Comment 3 Łukasz Żarnowiecki 2017-01-03 19:10:23 UTC
Created attachment 103173 [details]
Sample file that crashes gwenview
Comment 4 Christoph Feck 2017-01-04 20:21:12 UTC
Reproducible also with Qt 5.7.1.
Comment 5 Christoph Feck 2017-01-04 20:21:44 UTC
*** Bug 345272 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2017-01-04 20:22:10 UTC
*** Bug 330198 has been marked as a duplicate of this bug. ***
Comment 7 Anton Yablokov 2017-06-17 20:24:11 UTC
Created attachment 106148 [details]
New crash information added by DrKonqi

gwenview (4.14.0 pre) on KDE Platform 4.14.2 using Qt 4.8.6

- What I was doing when the application crashed:

I changed an opened SVG file externally and then hit Reload in the menu.

-- Backtrace (Reduced):
#6  QSvgTinyDocument::draw (this=0x21, p=p@entry=0x7ffeb5c217b0, bounds=...) at qsvgtinydocument.cpp:232
#7  0x00007f0f3ec87c75 in QSvgRenderer::render (this=<optimized out>, painter=painter@entry=0x7ffeb5c217b0, bounds=...) at qsvgrenderer.cpp:414
#8  0x00007f0f3ec8925e in QGraphicsSvgItem::paint (this=0xfb60d0, painter=0x7ffeb5c217b0, option=0x1087d68, widget=<optimized out>) at qgraphicssvgitem.cpp:254
#9  0x00007f0f4222d882 in _q_paintItem (item=item@entry=0xfb60e0, painter=painter@entry=0x7ffeb5c217b0, option=option@entry=0x1087d68, widget=widget@entry=0x1087410, useWindowOpacity=<optimized out>, painterStateProtection=painterStateProtection@entry=true) at graphicsview/qgraphicsscene.cpp:4305
#10 0x00007f0f42241c89 in QGraphicsScenePrivate::drawItemHelper (this=0x1087b40, item=<optimized out>, painter=0x7ffeb5c217b0, option=0x1087d68, widget=0x1087410, painterStateProtection=<optimized out>) at graphicsview/qgraphicsscene.cpp:4567
Comment 8 Huon 2018-03-24 04:37:48 UTC
This crash doesn't happen as soon as you reload an SVG, it only crashes if you try to change the zoom afterwards. For example if you hit F5 then navigate to Browse view, there is no crash. But hit F5 then click the zoom slider - crash.
Comment 9 Peter Mühlenpfordt 2018-04-15 07:52:15 UTC
Git commit f11f5a43b4a65a1a9f2893dc577b94b7af94a37b by Peter Mühlenpfordt.
Committed on 15/04/2018 at 07:50.
Pushed by muhlenpfordt into branch 'Applications/18.04'.

Fix reloading of SVG images

Summary:
If an SVG image is reloaded ({key F5} or {nav File > Reload}) the
`QSvgRenderer` is not updated after loading and Gwenview crashes
when trying to zoom. If the SVG file is changed outside Gwenview
while it is viewed and then reloaded it's not updated.
This is caused by a missing connection to the `loaded()` signal
and calling `SvgImageView::finishLoadFromDocument()` to setup the
new renderer.
FIXED-IN: 18.04.1

Test Plan:
1. Open SVG image in View Mode
2. Press {key F5} to reload
3. Zoom by mouse scroll or moving the slider
4. Gwenview should not crash

1. Open SVG image in View Mode
2. Overwrite viewed file with another SVG outside Gwenview
3. Press {key F5} to reload
4. New image should display

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: rkflx, huoni

Differential Revision: https://phabricator.kde.org/D12187

M  +6    -4    lib/documentview/svgviewadapter.cpp

https://commits.kde.org/gwenview/f11f5a43b4a65a1a9f2893dc577b94b7af94a37b