Bug 423029 - systemsettings5 crashes when switching away from Thunderbolt (kcm_bolt)
Summary: systemsettings5 crashes when switching away from Thunderbolt (kcm_bolt)
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 5.19.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 21:41 UTC by Markus Lohse
Modified: 2020-06-16 14:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.1


Attachments
running systemsettings5 with valgrind (78.17 KB, text/x-log)
2020-06-15 21:41 UTC, Markus Lohse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Lohse 2020-06-15 21:41:01 UTC
Created attachment 129397 [details]
running systemsettings5 with valgrind

STEPS TO REPRODUCE
1. Open system settings
2. Select "Thunderbolt"
3. Try to switch to any other item, e.g. "System Information"

OBSERVED RESULT
systemsettings5 crashes with signal 6 (SIGABRT) - always reproducible.

EXPECTED RESULT
systemsettings5 should not crash, but show "System Information"

SOFTWARE/OS VERSIONS
Linux: 5.7.2-arch1-1 #1 SMP PREEMPT Wed, 10 Jun 2020 20:36:24 +0000 x86_64 GNU/Linux
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.7.2-arch1-1
Qt Version: 5.15.0

ADDITIONAL INFORMATION
see attachment for console output (running systemsettings5 with valgrind)
Comment 1 David Edmundson 2020-06-15 22:41:11 UTC
Thanks.

https://invent.kde.org/plasma/plasma-thunderbolt/-/merge_requests/1
Comment 2 David Edmundson 2020-06-16 08:48:43 UTC
Git commit 8363502d2289524e5336a1928637fb316282163a by David Edmundson.
Committed on 15/06/2020 at 22:39.
Pushed by davidedmundson into branch 'Plasma/5.19'.

Don't set a parent on sharedpointer mangaed object

Device follows a pattern of being managed in QSharedPointers
At this point having a parent for the purposes of memory management
doesn't help.

The kded class can keep a reference to the device in pendingDevices,
this owns the manager so will drop it's reference after the manager is
gone.

M  +6    -6    src/lib/device.cpp
M  +4    -5    src/lib/device.h
M  +2    -2    src/lib/manager.cpp

https://invent.kde.org/plasma/plasma-thunderbolt/commit/8363502d2289524e5336a1928637fb316282163a