Bug 328807 - Removing sensor from graph causes KSysGuard crash
Summary: Removing sensor from graph causes KSysGuard crash
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Applications
Component: general (show other bugs)
Version: 4.11.3
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2013-12-14 18:50 UTC by S.Trzmiel
Modified: 2016-09-15 10:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S.Trzmiel 2013-12-14 18:50:07 UTC
Application: ksysguard (4.11.3)
KDE Platform Version: 4.11.3
Qt Version: 4.8.5
Operating System: Linux 3.11.10-200.fc19.i686.PAE i686
Distribution (Platform): Fedora RPMs

-- Information about the crash:
KSysguard crashes when user has removed sensor from graph properties.

Steps to reproduce bug:

1. Add new custom tab to KSysguard.
2. Drag a sensor and choose "bar graph" type.
3. Add few more sensors.
4. Open graphs properties and remove one of the sensors from the list on "Sensors" tab, then click "Ok"


Expected result:
Removed sensor disappears from graph, other sensors are rearranged and displayed properly.

Actual result:
KSysGuard crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Monitor systemowy (ksysguard), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#7  QString::indexOf (this=this@entry=0x9664860, ch=ch@entry=..., from=from@entry=0, cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:2626
#8  0x4e7eb3d2 in QFontMetrics::width (this=this@entry=0xbfe768a4, text=..., len=len@entry=-1, flags=flags@entry=0) at text/qfontmetrics.cpp:554
#9  0x4e7eb964 in QFontMetrics::width (this=this@entry=0xbfe768a4, text=..., len=len@entry=-1) at text/qfontmetrics.cpp:546
#10 0x4b6a07dd in BarGraph::paintEvent (this=0x94936c0) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/SensorDisplayLib/BarGraph.cpp:122
#11 0x4e5e3c1d in QWidget::event (this=0x94936c0, event=0xbfe76c38) at kernel/qwidget.cpp:8533
#12 0x4e5891a4 in QApplicationPrivate::notify_helper (this=0x92a4a28, receiver=0x94936c0, e=0xbfe76c38) at kernel/qapplication.cpp:4562
#13 0x4e58fcb9 in QApplication::notify (this=0x9296880, receiver=receiver@entry=0x94936c0, e=e@entry=0xbfe76c38) at kernel/qapplication.cpp:4348
#14 0x4cffbfe5 in KApplication::notify (this=0x9296880, receiver=0x94936c0, event=0xbfe76c38) at /usr/src/debug/kdelibs-4.11.3/kdeui/kernel/kapplication.cpp:311
#15 0x4b1f6a3a in QCoreApplication::notifyInternal (this=0x9296880, receiver=0x94936c0, event=0xbfe76c38) at kernel/qcoreapplication.cpp:949
#16 0x4e5dd861 in QWidgetPrivate::drawWidget (this=0x9493748, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at ../../src/corelib/kernel/qcoreapplication.h:234
#17 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x9493390, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#18 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x9493390, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5652
#19 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x941c1c8, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#20 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x941c1c8, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5652
#21 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x93f2bd0, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#22 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x93f2bd0, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5652
#23 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x93f2808, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#24 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x93f2808, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5652
#25 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x93f2600, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#26 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x93f2600, pdev=0x94bc6f0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5652
#27 0x4e5de37c in QWidgetPrivate::paintSiblingsRecursive (this=0x93d8738, pdev=0x94bc6f0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x940dcf8) at kernel/qwidget.cpp:5808
#28 0x4e5dd3fb in QWidgetPrivate::drawWidget (this=0x93d8738, pdev=0x94bc6f0, rgn=..., offset=..., flags=flags@entry=5, sharedPainter=sharedPainter@entry=0x0, backingStore=backingStore@entry=0x940dcf8) at kernel/qwidget.cpp:5652
#29 0x4e7cb8e6 in QWidgetBackingStore::sync (this=0x940dcf8) at painting/qbackingstore.cpp:1373
#30 0x4e5d173b in QWidgetPrivate::syncBackingStore (this=0x93d8738) at kernel/qwidget.cpp:1894
#31 0x4e5e365c in QWidget::event (this=0x93d8658, event=event@entry=0xbfe77d30) at kernel/qwidget.cpp:8680
#32 0x4ea0c28f in QMainWindow::event (this=this@entry=0x93d8658, event=event@entry=0xbfe77d30) at widgets/qmainwindow.cpp:1478
#33 0x4d0ce3d6 in KMainWindow::event (this=this@entry=0x93d8658, ev=ev@entry=0xbfe77d30) at /usr/src/debug/kdelibs-4.11.3/kdeui/widgets/kmainwindow.cpp:1084
#34 0x4d1111e7 in KXmlGuiWindow::event (this=this@entry=0x93d8658, ev=ev@entry=0xbfe77d30) at /usr/src/debug/kdelibs-4.11.3/kdeui/xmlgui/kxmlguiwindow.cpp:126
#35 0x4b6ddc8e in TopLevel::event (this=0x93d8658, e=0xbfe77d30) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/ksysguard.cpp:339
#36 0x4e5891a4 in QApplicationPrivate::notify_helper (this=0x92a4a28, receiver=0x93d8658, e=0xbfe77d30) at kernel/qapplication.cpp:4562
#37 0x4e58fcb9 in QApplication::notify (this=0x9296880, receiver=receiver@entry=0x93d8658, e=e@entry=0xbfe77d30) at kernel/qapplication.cpp:4348
#38 0x4cffbfe5 in KApplication::notify (this=0x9296880, receiver=0x93d8658, event=0xbfe77d30) at /usr/src/debug/kdelibs-4.11.3/kdeui/kernel/kapplication.cpp:311
#39 0x4b1f6a3a in QCoreApplication::notifyInternal (this=0x9296880, receiver=receiver@entry=0x93d8658, event=event@entry=0xbfe77d30) at kernel/qcoreapplication.cpp:949
#40 0x4e7cc667 in sendEvent (event=0xbfe77d30, receiver=0x93d8658) at ../../src/corelib/kernel/qcoreapplication.h:231
#41 sendUpdateRequest (updateImmediately=true, widget=0x93d8658) at painting/qbackingstore.cpp:534
#42 QWidgetBackingStore::markDirty (this=0x940dcf8, rect=..., widget=0x9493338, updateImmediately=true, invalidateBuffer=false) at painting/qbackingstore.cpp:722
#43 0x4e5d2192 in QWidget::repaint (this=0x9493338, rect=...) at kernel/qwidget.cpp:10484
#44 0x4e5d21ec in QWidget::repaint (this=0x9493338) at kernel/qwidget.cpp:10434
#45 0x4b6a29cb in DancingBars::configureSettings (this=0x9493338) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/SensorDisplayLib/DancingBars.cpp:144
#46 0x4b69ef1b in KSGRD::SensorDisplay::showContextMenu (this=this@entry=0x9493338, pos=...) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/SensorDisplayLib/SensorDisplay.cpp:133
#47 0x4b69f11c in KSGRD::SensorDisplay::eventFilter (this=0x9493338, object=0x94936c0, event=0xbfe782e4) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/SensorDisplayLib/SensorDisplay.cpp:151
#48 0x4b1f6bae in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x92a4a28, receiver=receiver@entry=0x94936c0, event=event@entry=0xbfe782e4) at kernel/qcoreapplication.cpp:1059
#49 0x4e589182 in QApplicationPrivate::notify_helper (this=0x92a4a28, receiver=receiver@entry=0x94936c0, e=0xbfe782e4) at kernel/qapplication.cpp:4558
#50 0x4e5918ec in QApplication::notify (this=0x9296880, receiver=receiver@entry=0x94936c0, e=e@entry=0xbfe782e4) at kernel/qapplication.cpp:4105
#51 0x4cffbfe5 in KApplication::notify (this=0x9296880, receiver=0x94936c0, event=0xbfe782e4) at /usr/src/debug/kdelibs-4.11.3/kdeui/kernel/kapplication.cpp:311
#52 0x4b1f6a3a in QCoreApplication::notifyInternal (this=0x9296880, receiver=receiver@entry=0x94936c0, event=event@entry=0xbfe782e4) at kernel/qcoreapplication.cpp:949
#53 0x4e58f534 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#54 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x94936c0, event=0xbfe782e4, alienWidget=0x94936c0, nativeWidget=0x93d8658, buttonDown=buttonDown@entry=0x4ef0bf64 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3173
#55 0x4e610c18 in QETWidget::translateMouseEvent (this=0x93d8658, event=event@entry=0xbfe784fc) at kernel/qapplication_x11.cpp:4538
#56 0x4e60f303 in QApplication::x11ProcessEvent (this=0x9296880, event=event@entry=0xbfe784fc) at kernel/qapplication_x11.cpp:3661
#57 0x4e63a0fb in x11EventSourceDispatch (s=s@entry=0x92aea00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#58 0x4be2a0e6 in g_main_dispatch (context=0x92ad6c8, context@entry=0x9279998) at gmain.c:3054
#59 g_main_context_dispatch (context=context@entry=0x92ad6c8) at gmain.c:3630
#60 0x4be2a498 in g_main_context_iterate (context=context@entry=0x92ad6c8, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3701
#61 0x4be2a559 in g_main_context_iteration (context=0x92ad6c8, may_block=1) at gmain.c:3762
#62 0x4b226b60 in QEventDispatcherGlib::processEvents (this=this@entry=0x9282330, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#63 0x4e63a2af in QGuiEventDispatcherGlib::processEvents (this=0x9282330, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#64 0x4b1f5444 in QEventLoop::processEvents (this=this@entry=0xbfe787b8, flags=...) at kernel/qeventloop.cpp:149
#65 0x4b1f5781 in QEventLoop::exec (this=this@entry=0xbfe787b8, flags=...) at kernel/qeventloop.cpp:204
#66 0x4b1fb21f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#67 0x4e5875f5 in QApplication::exec () at kernel/qapplication.cpp:3823
#68 0x4b6e293c in kdemain (argc=1, argv=0xbfe78954) at /usr/src/debug/kde-workspace-4.11.3/ksysguard/gui/ksysguard.cpp:581
#69 0x0804869c in main (argc=1, argv=0xbfe78954) at /usr/src/debug/kde-workspace-4.11.3/i686-redhat-linux-gnu/ksysguard/gui/ksysguard_dummy.cpp:3

Reported using DrKonqi
Comment 1 realnobody 2014-05-12 19:41:00 UTC
I guess this could be the same cause as bug 260869.
Comment 2 Raphael Kugelmann 2015-10-03 07:00:36 UTC
fixed with https://git.reviewboard.kde.org/r/125416/
needs to be submitted
Comment 3 David Edmundson 2016-09-15 10:44:30 UTC
Git commit 70e339f3d0d0aff16559f198ac4c6dc5f6c90111 by David Edmundson, on behalf of Raphael Kugelmann.
Committed on 15/09/2016 at 10:44.
Pushed by davidedmundson into branch 'master'.

Removing sensor from graph causes KSysGuard crash" (affected SensorType: DancingBars)

BugFix for "Bug 328807 - Removing sensor from graph causes KSysGuard
crash" (affected SensorType: DancingBars)

Two issues fixed:
- crash during removing a bar Sensor
- wrong Sensors is removed
- labels are not set as expected after removing a bar

REVIEW: 125416

M  +1    -1    gui/SensorDisplayLib/BarGraph.cpp
M  +4    -23   gui/SensorDisplayLib/DancingBars.cpp
M  +25   -0    gui/SensorDisplayLib/DancingBarsSettings.cpp
M  +4    -0    gui/SensorDisplayLib/DancingBarsSettings.h

http://commits.kde.org/ksysguard/70e339f3d0d0aff16559f198ac4c6dc5f6c90111