Bug 495140

Summary: Duplicate disc in Disks & Devices applet
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Disks & Devices widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: 2806891994, bogdan.onofriuchuk, nate
Priority: NOR Keywords: regression
Version First Reported In: 6.2.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:
Attachments: screenshot
log file

Description Patrick Silva 2024-10-21 11:53:57 UTC
Created attachment 175081 [details]
screenshot

STEPS TO REPRODUCE
1. insert a CD/DVD/BD
2. click on Disks & Devices applet in the system tray
3. 

OBSERVED RESULT
as seen in the attached screenshot, the inserted disc is duplicated in the Disks & Devices applet

EXPECTED RESULT
the inserted disc is listed once in the Disks & Devices applet

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-11-12 22:33:01 UTC
*** Bug 496039 has been marked as a duplicate of this bug. ***
Comment 2 Patrick Silva 2024-11-27 11:37:50 UTC
Fixed with recent updates on neon unstable. :)

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 3 Patrick Silva 2025-05-05 16:33:27 UTC
Can reproduce again.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Graphics Platform: Wayland
Comment 4 Bogdan Onofriuchuk 2025-05-05 16:45:19 UTC
Can you collect the logs please, because I don't have any disks. 
1. In terminal execute: QT_LOGGING_RULES="org.kde.applets.devicenotifier=true" plasmoidviewer -a org.kde.plasma.devicenotifier &> log.txt
2. Reproduce the bug
3. stop the process in terminal
4. attach the file log.txt here
Comment 5 Patrick Silva 2025-05-05 16:57:59 UTC
I get a segfault when the inserted disc is recognized:

$ QT_LOGGING_RULES="org.kde.applets.devicenotifier=true" plasmoidviewer -a org.kde.plasma.devicenotifier &> log.txt
Segmentation fault (core dumped)
Comment 6 Bogdan Onofriuchuk 2025-05-05 18:07:52 UTC
Yes. Looks like a bug in the plasmoidviewer. Can you use another command:
QT_LOGGING_RULES="org.kde.applets.devicenotifier=true" plasmawindowed org.kde.plasma.devicenotifier &> log.txt
This command should work correctly.
Comment 7 Patrick Silva 2025-05-05 18:15:51 UTC
Created attachment 180957 [details]
log file
Comment 8 Bug Janitor Service 2025-05-05 19:33:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5446
Comment 9 Bogdan Onofriuchuk 2025-05-09 09:54:02 UTC
Git commit a83c4e5f4139c47a8b36e94c75891e02739d8bde by Bogdan Onofriuchuk, on behalf of Bohdan Onofriichuk.
Committed on 09/05/2025 at 09:23.
Pushed by littlesweet into branch 'master'.

applets/devicenotifier: check if device has been added before

Skip device if applet already has device with similar udi

M  +6    -0    applets/devicenotifier/plugin/devicecontrol.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/a83c4e5f4139c47a8b36e94c75891e02739d8bde