Bug 456630 - Crash when pressing Escape in «Mouse Click Animations» Desktop Effect's configuration window
Summary: Crash when pressing Escape in «Mouse Click Animations» Desktop Effect's confi...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwineffects (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-07-12 15:22 UTC by ratijas
Modified: 2022-07-13 13:02 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-07-12 15:22:59 UTC
Application: systemsettings (5.25.80)
 (Compiled from sources)
Qt Version: 5.15.5
Frameworks Version: 5.97.0
Operating System: Linux 5.18.10-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.23.80 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
Configuring «Mouse Click Animations» Desktop Effect.

- Custom settings of the application:
Effect is enabled and colors are customized.

The crash can be reproduced every time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  0x00007f62d48b3575 in qDeleteAll<QList<KConfigDialogManager*>::const_iterator>(QList<KConfigDialogManager*>::const_iterator, QList<KConfigDialogManager*>::const_iterator) (begin=..., end=...) at /usr/include/qt/QtCore/qalgorithms.h:320
#6  0x00007f62d48b2fdf in qDeleteAll<QList<KConfigDialogManager*> >(QList<KConfigDialogManager*> const&) (c=...) at /usr/include/qt/QtCore/qalgorithms.h:328
#7  0x00007f62d48b1bc5 in KCModule::~KCModule() (this=0x562a8b80cf60, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/kconfigwidgets/src/kcmodule.cpp:203
#8  0x00007f6296a732bd in KWin::MouseClickEffectConfig::~MouseClickEffectConfig() (this=0x562a8b80cf60, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/kwin/src/effects/mouseclick/mouseclick_config.cpp:66
#9  0x00007f6296a732de in KWin::MouseClickEffectConfig::~MouseClickEffectConfig() (this=0x562a8b80cf60, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/kwin/src/effects/mouseclick/mouseclick_config.cpp:66
#10 0x00007f62d2910435 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt5Core.so.5
#11 0x00007f62d370ed95 in QWidget::~QWidget() () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f62d38e4c2e in QDialog::~QDialog() () at /usr/lib/libQt5Widgets.so.5
#13 0x00007f62d290d26a in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#14 0x00007f62d36ebb3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007f62d28e9ad8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#16 0x00007f62d28ea5e3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#17 0x00007f62d2930548 in  () at /usr/lib/libQt5Core.so.5
#18 0x00007f62d0484c6b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#19 0x00007f62d04db001 in  () at /usr/lib/libglib-2.0.so.0
#20 0x00007f62d0482392 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#21 0x00007f62d293432c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#22 0x00007f62d28e227c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#23 0x00007f62d28ecda9 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#24 0x0000562a87c2b8be in main(int, char**) (argc=1, argv=0x7fff1bca7128) at /home/ratijas/kde/src/kde/workspace/systemsettings/app/main.cpp:183
[Inferior 1 (process 87522) detached]

Possible duplicates by query: bug 456531, bug 456329, bug 456235, bug 455932, bug 455610.

Reported using DrKonqi
Comment 1 ratijas 2022-07-12 20:48:17 UTC
Same in MagnifierEffectConfig, and supposedly any other effect KCM that hold its associated Form object directly instead of by-pointer.
Comment 2 ratijas 2022-07-12 20:52:02 UTC
Likely caused by https://invent.kde.org/plasma/kwin/-/merge_requests/2557
Comment 3 Bug Janitor Service 2022-07-12 21:26:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2645
Comment 4 Bug Janitor Service 2022-07-13 11:34:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/145
Comment 5 David Edmundson 2022-07-13 13:02:19 UTC
Git commit eb393b1381e526a5ee1e8092fecac98fa3e9eb45 by David Edmundson.
Committed on 13/07/2022 at 11:31.
Pushed by davidedmundson into branch 'master'.

Avoid tracking dangling KConfigDialogManager

A manager is created with a parent `new KConfigDialogManager(widget,
config);` this parent comes externally.

KCModules also explicitly deletes managers.

Typically it would have the same parent as the KCModule which is why it
hasn't been a big issue so far.

Having a parent whilst being explicitly managed is an anti-pattern, but
at a minimum we should clear up our list as we go so we don't risk a
double delete.

M  +6    -0    src/kcmodule.cpp

https://invent.kde.org/frameworks/kconfigwidgets/commit/eb393b1381e526a5ee1e8092fecac98fa3e9eb45