Bug 428746

Summary: Crash after attaching USB disk
Product: [Plasma] plasma-disks Reporter: kde
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: kdelibs-bugs, nate, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.20.3
Attachments: backtrace

Description kde 2020-11-05 20:57:46 UTC
Created attachment 133069 [details]
backtrace

Today I got a crash notification after attaching a USB disk.
It's a USB 2.0 enclosure with HDD inside.

Backtrace is attached.

Operating System: openSUSE Tumbleweed 20201030
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.9.1-1-default
Comment 1 Nate Graham 2020-11-05 21:59:49 UTC
#9  Device::udi() const (this=0x564536c217c0) at /usr/src/debug/plasma5-disks-5.20.1-1.1.x86_64/src/device.h:35
#10 operator() (dev=0x564536c217c0, __closure=0x7ffd7facadb0) at /usr/src/debug/plasma5-disks-5.20.1-1.1.x86_64/src/smartmonitor.cpp:55
#11 __gnu_cxx::__ops::_Iter_pred<SMARTMonitor::removeUDI(const QString&)::<lambda(Device*)> >::operator()<Device**> (__it=0x7fba0800c640,
Comment 2 Harald Sitter 2020-11-06 14:54:23 UTC
Is this reproducible?
Comment 3 Harald Sitter 2020-11-09 09:51:49 UTC
.
Comment 4 Bug Janitor Service 2020-11-09 11:47:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-disks/-/merge_requests/8
Comment 5 Harald Sitter 2020-11-09 12:08:16 UTC
Git commit fd099a75c484c5cbd4729f276799930b56c9449d by Harald Sitter.
Committed on 09/11/2020 at 11:46.
Pushed by sitter into branch 'master'.

actually erase devices

somebody forgot to actually erase 😞

this would eventually result in a crash as the container would have
dangling pointers as remove only moves around the entries so the
container would be the same size before and after remove but one of the
pointers would then get deleted in the eventloop
FIXED-IN: 5.20.3

M  +6    -0    autotests/smartmonitortest.cpp
M  +2    -1    src/smartmonitor.cpp

https://invent.kde.org/plasma/plasma-disks/commit/fd099a75c484c5cbd4729f276799930b56c9449d
Comment 6 Harald Sitter 2020-11-09 12:08:40 UTC
Git commit 916f0081b2334759b3d92ba2ca5c042d2df85535 by Harald Sitter.
Committed on 09/11/2020 at 12:08.
Pushed by sitter into branch 'Plasma/5.20'.

actually erase devices

somebody forgot to actually erase 😞

this would eventually result in a crash as the container would have
dangling pointers as remove only moves around the entries so the
container would be the same size before and after remove but one of the
pointers would then get deleted in the eventloop
FIXED-IN: 5.20.3


(cherry picked from commit fd099a75c484c5cbd4729f276799930b56c9449d)

M  +6    -0    autotests/smartmonitortest.cpp
M  +2    -1    src/smartmonitor.cpp

https://invent.kde.org/plasma/plasma-disks/commit/916f0081b2334759b3d92ba2ca5c042d2df85535