Bug 514230 - possible NULL pointer dereference in KontactKCMultiDialog::closeEvent
Summary: possible NULL pointer dereference in KontactKCMultiDialog::closeEvent
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.5.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-06 15:29 UTC by Johannes Penßel
Modified: 2026-01-07 12:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Penßel 2026-01-06 15:29:21 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. navigate to settings -> Configure Kontact...
2. close the configuration window using the close button
3. repeat steps 1 and 2 (alternatively, close the Kontact main window using the close button)

OBSERVED RESULT
the application crashes due to a segmentation fault

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Gentoo Linux
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION

When closing the configuration window, the function KontactKCMultiDialog::closeEvent deletes all KCModules currently held, after which the window gets hidden. When reopening it, the previously deleted KCModules are not recreated. The next activation of  KontactKCMultiDialog::closeEvent triggers a NULL pointer dereference by attempting to remove the already deleted KCModules once again.
Comment 1 Bug Janitor Service 2026-01-06 22:52:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kontact/-/merge_requests/38
Comment 2 Johannes Penßel 2026-01-07 12:08:33 UTC
This was fixed by https://invent.kde.org/pim/kontact/-/merge_requests/37