Bug 403064 - Dolphin crashes when hiding device from device tab
Summary: Dolphin crashes when hiding device from device tab
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 18.12.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: David Hallas
URL:
Keywords: drkonqi
: 407943 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-10 10:54 UTC by Dennis Irrgang
Modified: 2019-05-25 16:54 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08.0


Attachments
New crash information added by DrKonqi (16.70 KB, text/plain)
2019-03-24 01:50 UTC, Lukas Bartl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Irrgang 2019-01-10 10:54:02 UTC
Application: dolphin (18.12.0)

Qt Version: 5.12.0
Frameworks Version: 5.53.0
Operating System: Linux 4.19.11-1-default x86_64
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
- What I was doing when the application crashed:
I'm using encryption on my notebook so I saw 4 devices in my device tab:
/home Drive
/home Encrypted Drive
/ Drive
/ Encrypted Drive

To 'clean things up' I chose to hide the non-encrypted devices as they seemed to make no difference. While doing so dolphin crashed. (It did however successfully hide the drive prior to crashing)

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc7f2ac7940 (LWP 5654))]

Thread 5 (Thread 0x7fc7dec22700 (LWP 5659)):
#0  0x00007fc7f9476d34 in read () from /lib64/libc.so.6
#1  0x00007fc7f47d5a00 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fc7f478fa4b in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fc7f478fef0 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fc7f479006c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007fc7f741f88b in QEventDispatcherGlib::processEvents (this=0x7fc7d8000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007fc7f73ca02b in QEventLoop::exec (this=this@entry=0x7fc7dec21c60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#7  0x00007fc7f72143b6 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#8  0x00007fc7f7215702 in QThreadPrivate::start (arg=0x5644d29ce9f0) at thread/qthread_unix.cpp:361
#9  0x00007fc7f56fc554 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fc7f9485ccf in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fc7ec904700 (LWP 5658)):
#0  0x00007fc7f57024dc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fc7ecde2083 in ?? () from /usr/lib64/dri/i965_dri.so
#2  0x00007fc7ecde1dd7 in ?? () from /usr/lib64/dri/i965_dri.so
#3  0x00007fc7f56fc554 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fc7f9485ccf in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fc7eee47700 (LWP 5657)):
#0  0x00007fc7f947b2c9 in poll () from /lib64/libc.so.6
#1  0x00007fc7f478ff46 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fc7f479006c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fc7f741f88b in QEventDispatcherGlib::processEvents (this=0x7fc7e0000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fc7f73ca02b in QEventLoop::exec (this=this@entry=0x7fc7eee46c30, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#5  0x00007fc7f72143b6 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#6  0x00007fc7f7694565 in ?? () from /usr/lib64/libQt5DBus.so.5
#7  0x00007fc7f7215702 in QThreadPrivate::start (arg=0x7fc7f770ed80) at thread/qthread_unix.cpp:361
#8  0x00007fc7f56fc554 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fc7f9485ccf in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fc7f020e700 (LWP 5656)):
#0  0x00007fc7f947b2c9 in poll () from /lib64/libc.so.6
#1  0x00007fc7f429bcc7 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fc7f429d8ea in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fc7f0e245da in QXcbEventQueue::run (this=0x5644d240c260) at qxcbeventqueue.cpp:225
#4  0x00007fc7f7215702 in QThreadPrivate::start (arg=0x5644d240c260) at thread/qthread_unix.cpp:361
#5  0x00007fc7f56fc554 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fc7f9485ccf in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fc7f2ac7940 (LWP 5654)):
[KCrash Handler]
#6  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > (ptr=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1038
#7  QObject::d_func (this=0x0) at kernel/qobject.h:121
#8  QMetaObject::activate (sender=0x0, signalOffset=3, local_signal_index=3, argv=0x7ffe579fdfb0) at kernel/qobject.cpp:3641
#9  0x00007fc7f934702a in KItemModelBase::itemsChanged (this=<optimized out>, _t1=..., _t2=...) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/build/src/dolphinprivate_autogen/Z3MQH7AOBD/moc_kitemmodelbase.cpp:266
#10 0x00007fc7f92f4f17 in KStandardItem::setDataValue (this=this@entry=0x5644d2a77a10, role=..., value=...) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/kitemviews/kitemrange.h:62
#11 0x00007fc7f98d7a33 in PlacesItem::setHidden (this=this@entry=0x5644d2a77a10, hidden=<optimized out>) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/panels/places/placesitem.cpp:85
#12 0x00007fc7f98d5c13 in PlacesPanel::slotItemContextMenuRequested (this=0x5644d26775d0, index=<optimized out>, pos=...) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/panels/places/placespanel.cpp:260
#13 0x00007fc7f73f5200 in QtPrivate::QSlotObjectBase::call (a=0x7ffe579fe2e0, r=0x5644d26775d0, this=0x5644d2a813f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#14 QMetaObject::activate (sender=0x5644d2a214e0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3759
#15 0x00007fc7f93462c6 in KItemListController::itemContextMenuRequested (this=<optimized out>, _t1=<optimized out>, _t2=...) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/build/src/dolphinprivate_autogen/Z3MQH7AOBD/moc_kitemlistcontroller.cpp:453
#16 0x00007fc7f92db4c1 in KItemListController::mousePressEvent (this=0x5644d2a214e0, event=0x7ffe579fec70, transform=...) at /usr/include/qt5/QtCore/qpoint.h:131
#17 0x00007fc7f92dad1f in KItemListController::processEvent (this=this@entry=0x5644d2a214e0, event=event@entry=0x7ffe579fec70, transform=...) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/kitemviews/kitemlistcontroller.cpp:1072
#18 0x00007fc7f92ec68f in KItemListView::event (this=0x5644d2a81680, event=0x7ffe579fec70) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/kitemviews/kitemlistview.cpp:919
#19 0x00007fc7f7e4f591 in QApplicationPrivate::notify_helper (this=this@entry=0x5644d23e97a0, receiver=receiver@entry=0x5644d2a81680, e=e@entry=0x7ffe579fec70) at kernel/qapplication.cpp:3753
#20 0x00007fc7f7e56b50 in QApplication::notify (this=0x7ffe579ffbc0, receiver=0x5644d2a81680, e=0x7ffe579fec70) at kernel/qapplication.cpp:3500
#21 0x00007fc7f73cb359 in QCoreApplication::notifyInternal2 (receiver=0x5644d2a81680, event=0x7ffe579fec70) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#22 0x00007fc7f8151e23 in QGraphicsScenePrivate::sendEvent (this=<optimized out>, event=0x7ffe579fec70, item=0x5644d2a81690) at graphicsview/qgraphicsscene.cpp:1246
#23 QGraphicsScenePrivate::sendEvent (this=<optimized out>, item=0x5644d2a81690, event=0x7ffe579fec70) at graphicsview/qgraphicsscene.cpp:1226
#24 0x00007fc7f8152258 in QGraphicsScenePrivate::sendMouseEvent (this=this@entry=0x5644d25dd060, mouseEvent=mouseEvent@entry=0x7ffe579fec70) at graphicsview/qgraphicsscene.cpp:1327
#25 0x00007fc7f81599fb in QGraphicsScenePrivate::mousePressEventHandler (this=this@entry=0x5644d25dd060, mouseEvent=mouseEvent@entry=0x7ffe579fec70) at graphicsview/qgraphicsscene.cpp:1454
#26 0x00007fc7f8159c29 in QGraphicsScene::mousePressEvent (this=<optimized out>, mouseEvent=0x7ffe579fec70) at graphicsview/qgraphicsscene.cpp:4049
#27 0x00007fc7f81618f0 in QGraphicsScene::event (this=0x5644d2a857b0, event=0x7ffe579fec70) at graphicsview/qgraphicsscene.cpp:3413
#28 0x00007fc7f7e4f591 in QApplicationPrivate::notify_helper (this=this@entry=0x5644d23e97a0, receiver=receiver@entry=0x5644d2a857b0, e=e@entry=0x7ffe579fec70) at kernel/qapplication.cpp:3753
#29 0x00007fc7f7e56b50 in QApplication::notify (this=0x7ffe579ffbc0, receiver=0x5644d2a857b0, e=0x7ffe579fec70) at kernel/qapplication.cpp:3500
#30 0x00007fc7f73cb359 in QCoreApplication::notifyInternal2 (receiver=0x5644d2a857b0, event=0x7ffe579fec70) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#31 0x00007fc7f817eb8b in QGraphicsView::mousePressEvent (this=0x5644d2a54200, event=0x7ffe579ff280) at /usr/include/c++/8/bits/atomic_base.h:390
#32 0x00007fc7f7e8f6bf in QWidget::event (this=this@entry=0x5644d2a54200, event=event@entry=0x7ffe579ff280) at kernel/qwidget.cpp:8884
#33 0x00007fc7f7f32bfe in QFrame::event (this=0x5644d2a54200, e=0x7ffe579ff280) at widgets/qframe.cpp:550
#34 0x00007fc7f817fd53 in QGraphicsView::viewportEvent (this=0x5644d2a54200, event=0x7ffe579ff280) at graphicsview/qgraphicsview.cpp:2969
#35 0x00007fc7f73cb06b in QCoreApplicationPrivate::sendThroughObjectEventFilters (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:1187
#36 QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x5644d2a68df0, event=event@entry=0x7ffe579ff280) at kernel/qcoreapplication.cpp:1176
#37 0x00007fc7f7e4f581 in QApplicationPrivate::notify_helper (this=this@entry=0x5644d23e97a0, receiver=receiver@entry=0x5644d2a68df0, e=e@entry=0x7ffe579ff280) at kernel/qapplication.cpp:3745
#38 0x00007fc7f7e56d97 in QApplication::notify (this=<optimized out>, receiver=0x5644d2a68df0, e=0x7ffe579ff280) at kernel/qapplication.cpp:3214
#39 0x00007fc7f73cb359 in QCoreApplication::notifyInternal2 (receiver=0x5644d2a68df0, event=0x7ffe579ff280) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#40 0x00007fc7f7e560a0 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x5644d2a68df0, event=event@entry=0x7ffe579ff280, alienWidget=alienWidget@entry=0x5644d2a68df0, nativeWidget=0x5644d2516910, buttonDown=buttonDown@entry=0x7fc7f834e8d0 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2700
#41 0x00007fc7f7ea9775 in QWidgetWindow::handleMouseEvent (this=0x5644d2524940, event=0x7ffe579ff700) at /usr/include/c++/8/bits/atomic_base.h:390
#42 0x00007fc7f7eac5cf in QWidgetWindow::event (event=0x7ffe579ff700, this=0x5644d2524940) at kernel/qwidgetwindow.cpp:280
#43 QWidgetWindow::event (this=0x5644d2524940, event=0x7ffe579ff700) at kernel/qwidgetwindow.cpp:224
#44 0x00007fc7f7e4f591 in QApplicationPrivate::notify_helper (this=this@entry=0x5644d23e97a0, receiver=receiver@entry=0x5644d2524940, e=e@entry=0x7ffe579ff700) at kernel/qapplication.cpp:3753
#45 0x00007fc7f7e56b50 in QApplication::notify (this=0x7ffe579ffbc0, receiver=0x5644d2524940, e=0x7ffe579ff700) at kernel/qapplication.cpp:3500
#46 0x00007fc7f73cb359 in QCoreApplication::notifyInternal2 (receiver=0x5644d2524940, event=0x7ffe579ff700) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#47 0x00007fc7f784655d in QGuiApplicationPrivate::processMouseEvent (e=0x5644d2feb240) at kernel/qguiapplication.cpp:2102
#48 0x00007fc7f7847975 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x5644d2feb240) at kernel/qguiapplication.cpp:1837
#49 0x00007fc7f7821ccb in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1068
#50 0x00007fc7f0e255ba in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#51 0x00007fc7f478fc15 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#52 0x00007fc7f478ffd8 in ?? () from /usr/lib64/libglib-2.0.so.0
#53 0x00007fc7f479006c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#54 0x00007fc7f741f873 in QEventDispatcherGlib::processEvents (this=0x5644d24b0800, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#55 0x00007fc7f73ca02b in QEventLoop::exec (this=this@entry=0x7ffe579ffac0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#56 0x00007fc7f73d2192 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#57 0x00007fc7f783cadc in QGuiApplication::exec () at kernel/qguiapplication.cpp:1779
#58 0x00007fc7f7e4f505 in QApplication::exec () at kernel/qapplication.cpp:2910
#59 0x00007fc7f98b7027 in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin-18.12.0-1.1.x86_64/src/main.cpp:151
#60 0x00007fc7f93adfeb in __libc_start_main () from /lib64/libc.so.6
#61 0x00005644d189408a in _start () at ../sysdeps/x86_64/start.S:120
[Inferior 1 (process 5654) detached]

Reported using DrKonqi
Comment 1 Elvis Angelaccio 2019-01-13 09:32:03 UTC
Can you reproduce the crash every time?
Comment 2 Dennis Irrgang 2019-01-13 10:15:03 UTC
(In reply to Elvis Angelaccio from comment #1)
> Can you reproduce the crash every time?

I tried un-hiding and re-hiding the devices a bunch of times, but couldn't reproduce the crash unfortunately. Though I'm running a new version of Dolphin now, so take it with a grain of salt.
Comment 3 Elvis Angelaccio 2019-01-13 12:37:06 UTC
Ok. If you manage to reproduce it, please provide a valgrind log as described here: https://community.kde.org/Dolphin/FAQ/Crashes
Comment 4 Lukas Bartl 2019-03-24 01:50:40 UTC
Created attachment 118989 [details]
New crash information added by DrKonqi

dolphin (18.12.2) using Qt 5.11.3

- What I was doing when the application crashed:

I hided an encrypted device in dolphin. I can reproduce the bug sometimes.

-- Backtrace (Reduced):
#10 0x00007f7dd296fc3e in KItemModelBase::itemsChanged(KItemRangeList const&, QSet<QByteArray> const&) () from /lib64/libdolphinprivate.so.5
#11 0x00007f7dd291c97b in KStandardItem::setDataValue(QByteArray const&, QVariant const&) () from /lib64/libdolphinprivate.so.5
[...]
#14 0x00007f7dd06ca1c3 in QtPrivate::QSlotObjectBase::call (a=0x7fff8af7f490, r=0x5624cdeee170, this=0x5624ce657420) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376
[...]
#16 0x00007f7dd296ee8a in KItemListController::itemContextMenuRequested(int, QPointF const&) () from /lib64/libdolphinprivate.so.5
#17 0x00007f7dd2902791 in KItemListController::mousePressEvent(QGraphicsSceneMouseEvent*, QTransform const&) () from /lib64/libdolphinprivate.so.5
Comment 5 David Hallas 2019-03-24 19:00:30 UTC
I can reproduce the crash if I do the following:

1. Right click a device in the places panel and select hide
2. Right click the places panel and select show hidden
3. Right click the hidden device and select show
4. Right click the same device and select hide

This is the output I get from address sanitizer:

=================================================================
==10758==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000661db8 at pc 0x7f11e094c809 bp 0x7fffc2009310 sp 0x7fffc2009300
READ of size 8 at 0x60d000661db8 thread T0
    #0 0x7f11e094c808 in KStandardItem::setDataValue(QByteArray const&, QVariant const&) ../src/kitemviews/kstandarditem.cpp:118
    #1 0x7f11e222b1a8 in PlacesItem::setHidden(bool) ../src/panels/places/placesitem.cpp:96
    #2 0x7f11e221cb94 in PlacesPanel::slotItemContextMenuRequested(int, QPointF const&) ../src/panels/places/placespanel.cpp:260
    #3 0x7f11e222905a in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<int, QPointF const&>, void, void (PlacesPanel::*)(int, QPointF const&)>::call(void (PlacesPanel::*)(int, QPointF const&), PlacesPanel*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:134
    #4 0x7f11e2228621 in void QtPrivate::FunctionPointer<void (PlacesPanel::*)(int, QPointF const&)>::call<QtPrivate::List<int, QPointF const&>, void>(void (PlacesPanel::*)(int, QPointF const&), PlacesPanel*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:167
    #5 0x7f11e222769b in QtPrivate::QSlotObject<void (PlacesPanel::*)(int, QPointF const&), QtPrivate::List<int, QPointF const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:396
    #6 0x7f11d919c96e in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x26796e)
    #7 0x7f11e0a73a39 in KItemListController::itemContextMenuRequested(int, QPointF const&) src/dolphinprivate_autogen/Z3MQH7AOBD/moc_kitemlistcontroller.cpp:449
    #8 0x7f11e08d7199 in KItemListController::mousePressEvent(QGraphicsSceneMouseEvent*, QTransform const&) ../src/kitemviews/kitemlistcontroller.cpp:624
    #9 0x7f11e08dc2c4 in KItemListController::processEvent(QEvent*, QTransform const&) ../src/kitemviews/kitemlistcontroller.cpp:1038
    #10 0x7f11e08fbaf1 in KItemListView::event(QEvent*) ../src/kitemviews/kitemlistview.cpp:923
    #11 0x7f11da2f9d8b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x15ad8b)
    #12 0x7f11da30134e in QApplication::notify(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x16234e)
    #13 0x7f11d91753a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x2403a0)
    #14 0x7f11da5ff8c2  (/usr/lib64/libQt5Widgets.so.5+0x4608c2)
    #15 0x7f11da5ffcb1  (/usr/lib64/libQt5Widgets.so.5+0x460cb1)
    #16 0x7f11da607cea  (/usr/lib64/libQt5Widgets.so.5+0x468cea)
    #17 0x7f11da607f28 in QGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent*) (/usr/lib64/libQt5Widgets.so.5+0x468f28)
    #18 0x7f11da60f1cf in QGraphicsScene::event(QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x4701cf)
    #19 0x7f11da2f9d8b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x15ad8b)
    #20 0x7f11da30134e in QApplication::notify(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x16234e)
    #21 0x7f11d91753a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x2403a0)
    #22 0x7f11da62bda3 in QGraphicsView::mousePressEvent(QMouseEvent*) (/usr/lib64/libQt5Widgets.so.5+0x48cda3)
    #23 0x7f11da33941e in QWidget::event(QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x19a41e)
    #24 0x7f11da3dab3d in QFrame::event(QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x23bb3d)
    #25 0x7f11da62d04a in QGraphicsView::viewportEvent(QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x48e04a)
    #26 0x7f11d91751ed in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x2401ed)
    #27 0x7f11da2f9d64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x15ad64)
    #28 0x7f11da301ee6 in QApplication::notify(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ee6)
    #29 0x7f11d91753a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x2403a0)
    #30 0x7f11da300831 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (/usr/lib64/libQt5Widgets.so.5+0x161831)
    #31 0x7f11da353ac2  (/usr/lib64/libQt5Widgets.so.5+0x1b4ac2)
    #32 0x7f11da356088  (/usr/lib64/libQt5Widgets.so.5+0x1b7088)
    #33 0x7f11da2f9d8b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x15ad8b)
    #34 0x7f11da30134e in QApplication::notify(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x16234e)
    #35 0x7f11d91753a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x2403a0)
    #36 0x7f11d9bbbf02 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/usr/lib64/libQt5Gui.so.5+0xfbf02)
    #37 0x7f11d9bbdc34 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/usr/lib64/libQt5Gui.so.5+0xfdc34)
    #38 0x7f11d9b98dba in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Gui.so.5+0xd8dba)
    #39 0x7f11c8aad74a  (/usr/lib64/libQt5XcbQpa.so.5+0xcc74a)
    #40 0x7f11d9174372 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x23f372)
    #41 0x7f11d917c1a1 in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x2471a1)
    #42 0x7f11e218859a in kdemain ../src/main.cpp:168
    #43 0x56181eb18956 in main src/dolphin_dummy.cpp:3
    #44 0x7f11e13baae6 in __libc_start_main ../csu/libc-start.c:308
    #45 0x56181eb18859 in _start (/home/dha/workspace/kde/install/bin/dolphin+0x859)

0x60d000661db8 is located 24 bytes inside of 136-byte region [0x60d000661da0,0x60d000661e28)
freed by thread T0 here:
    #0 0x7f11e26d2c30 in operator delete(void*) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:135
    #1 0x7f11e222a1d3 in PlacesItem::~PlacesItem() ../src/panels/places/placesitem.cpp:51
    #2 0x7f11e096eefd in KStandardItemModel::removeItem(int) ../src/kitemviews/kstandarditemmodel.cpp:115
    #3 0x7f11e223eea5 in PlacesItemModel::onSourceModelDataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) ../src/panels/places/placesitemmodel.cpp:569
    #4 0x7f11e2250ff1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QVector<int> const&>, void, void (PlacesItemModel::*)(QModelIndex const&, QModelIndex const&, QVector<int> const&)>::call(void (PlacesItemModel::*)(QModelIndex const&, QModelIndex const&, QVector<int> const&), PlacesItemModel*, void**) (/home/dha/workspace/kde/install/lib64/libkdeinit5_dolphin.so+0x147ff1)
    #5 0x7f11e224fb9d in void QtPrivate::FunctionPointer<void (PlacesItemModel::*)(QModelIndex const&, QModelIndex const&, QVector<int> const&)>::call<QtPrivate::List<QModelIndex const&, QModelIndex const&, QVector<int> const&>, void>(void (PlacesItemModel::*)(QModelIndex const&, QModelIndex const&, QVector<int> const&), PlacesItemModel*, void**) (/home/dha/workspace/kde/install/lib64/libkdeinit5_dolphin.so+0x146b9d)
    #6 0x7f11e224b6fd in QtPrivate::QSlotObject<void (PlacesItemModel::*)(QModelIndex const&, QModelIndex const&, QVector<int> const&), QtPrivate::List<QModelIndex const&, QModelIndex const&, QVector<int> const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:396
    #7 0x7f11d919c96e in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x26796e)
    #8 0x7f11d913245b in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) (/usr/lib64/libQt5Core.so.5+0x1fd45b)

previously allocated by thread T0 here:
    #0 0x7f11e26d1dc0 in operator new(unsigned long) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:90
    #1 0x7f11e223b231 in PlacesItemModel::addItemFromSourceModel(QModelIndex const&) ../src/panels/places/placesitemmodel.cpp:392
    #2 0x7f11e223644d in PlacesItemModel::setHiddenItemsShown(bool) ../src/panels/places/placesitemmodel.cpp:115
    #3 0x7f11e2222d67 in PlacesPanel::showHiddenEntries(bool) ../src/panels/places/placespanel.cpp:551
    #4 0x7f11e221e72c in PlacesPanel::slotViewContextMenuRequested(QPointF const&) ../src/panels/places/placespanel.cpp:345
    #5 0x7f11e222930c in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QPointF const&>, void, void (PlacesPanel::*)(QPointF const&)>::call(void (PlacesPanel::*)(QPointF const&), PlacesPanel*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:134
    #6 0x7f11e2228666 in void QtPrivate::FunctionPointer<void (PlacesPanel::*)(QPointF const&)>::call<QtPrivate::List<QPointF const&>, void>(void (PlacesPanel::*)(QPointF const&), PlacesPanel*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:167
    #7 0x7f11e222786b in QtPrivate::QSlotObject<void (PlacesPanel::*)(QPointF const&), QtPrivate::List<QPointF const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:396
    #8 0x7f11d919c96e in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x26796e)
    #9 0x7f11e0a73bba in KItemListController::viewContextMenuRequested(QPointF const&) src/dolphinprivate_autogen/Z3MQH7AOBD/moc_kitemlistcontroller.cpp:456
    #10 0x7f11e08d7526 in KItemListController::mousePressEvent(QGraphicsSceneMouseEvent*, QTransform const&) ../src/kitemviews/kitemlistcontroller.cpp:635
    #11 0x7f11e08dc2c4 in KItemListController::processEvent(QEvent*, QTransform const&) ../src/kitemviews/kitemlistcontroller.cpp:1038
    #12 0x7f11e08fbaf1 in KItemListView::event(QEvent*) ../src/kitemviews/kitemlistview.cpp:923
    #13 0x7f11da2f9d8b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x15ad8b)

SUMMARY: AddressSanitizer: heap-use-after-free ../src/kitemviews/kstandarditem.cpp:118 in KStandardItem::setDataValue(QByteArray const&, QVariant const&)
Shadow bytes around the buggy address:
  0x0c1a800c4360: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
  0x0c1a800c4370: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
  0x0c1a800c4380: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c1a800c4390: fd fa fa fa fa fa fa fa fa fa fd fd fd fd fd fd
  0x0c1a800c43a0: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa
=>0x0c1a800c43b0: fa fa fa fa fd fd fd[fd]fd fd fd fd fd fd fd fd
  0x0c1a800c43c0: fd fd fd fd fd fa fa fa fa fa fa fa fa fa fd fd
  0x0c1a800c43d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c1a800c43e0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c1a800c43f0: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
  0x0c1a800c4400: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==10758==ABORTING
Comment 6 David Hallas 2019-03-24 19:01:23 UTC
I have pushed a fix for it here:

https://phabricator.kde.org/D20024

Please test and report if it fixes the problem.
Comment 7 David Hallas 2019-05-13 14:58:32 UTC
Git commit 78540e49213ed1a03687d55063816659c9142eba by David Hallas.
Committed on 13/05/2019 at 14:58.
Pushed by hallas into branch 'master'.

Summary: Fixes crash when hiding devices

Summary:
Fixes crash when hiding devices. The crash is caused by
KStandardItem::setDataValue which calls the
KStandardItemModel::onItemChanged function, and that function will
delete the KStandardItem if the data value being set is the hidden
attribute being set to true. To fix this KStandardItem now derives
QObject so that we can use deleteLater.

Test Plan:
Right click a device in the places panel and select hide
Right click the places panel and select show hidden
Right click the hidden device and select show
Right click the same device and select hide

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

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

M  +3    -30   src/kitemviews/kstandarditem.cpp
M  +3    -11   src/kitemviews/kstandarditem.h
M  +1    -1    src/kitemviews/kstandarditemmodel.cpp

https://commits.kde.org/dolphin/78540e49213ed1a03687d55063816659c9142eba
Comment 8 Elvis Angelaccio 2019-05-25 16:54:24 UTC
*** Bug 407943 has been marked as a duplicate of this bug. ***