After a widget has been unregistered, a WinIdChange event may be sent.
If that happens, ShadowHelper is going to try to install a shadow for
the corresponding widget. Obviously, this is wrong.
Details
Details
- Reviewers
cblack - Group Reviewers
Plasma - Commits
- R31:49fdd73e1629: [kstyle] Properly unregister widgets in ShadowHelper
Diff Detail
Diff Detail
- Repository
- R31 Breeze
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
FWIW, I have the kdatetimeedittest unit test from KWidgetAddons fail with a SIGSEGV even after building breeze with this diff:
Thread 1 "kdatetimeeditte" received signal SIGSEGV, Segmentation fault. 0x00007ffff0c6c770 in qDeleteAll<QMap<QWidget*, KWindowShadow*>::const_iterator> (begin=..., end=...) at /usr/include/qt5/QtCore/qalgorithms.h:320 320 delete *begin; (gdb) bt #0 0x00007ffff0c6c770 in qDeleteAll<QMap<QWidget*, KWindowShadow*>::const_iterator> (begin=..., end=...) at /usr/include/qt5/QtCore/qalgorithms.h:320 #1 0x00007ffff0c6bdb8 in qDeleteAll<QMap<QWidget*, KWindowShadow*> > (c=...) at /usr/include/qt5/QtCore/qalgorithms.h:328 #2 0x00007ffff0c69319 in Breeze::ShadowHelper::~ShadowHelper (this=0x547ca0, __in_chrg=<optimized out>) at /home/ahmad/rpmbuild/dev/breeze/kstyle/breezeshadowhelper.cpp:106 #3 0x00007ffff0c69380 in Breeze::ShadowHelper::~ShadowHelper (this=0x547ca0, __in_chrg=<optimized out>) at /home/ahmad/rpmbuild/dev/breeze/kstyle/breezeshadowhelper.cpp:107 #4 0x00007ffff0c701a2 in Breeze::Style::~Style (this=0x547a40, __in_chrg=<optimized out>) at /home/ahmad/rpmbuild/dev/breeze/kstyle/breezestyle.cpp:200 #5 0x00007ffff0c70206 in Breeze::Style::~Style (this=0x547a40, __in_chrg=<optimized out>) at /home/ahmad/rpmbuild/dev/breeze/kstyle/breezestyle.cpp:202 #6 0x00007ffff77ff5e8 in QApplication::~QApplication (this=0x7fffffffdd00, __in_chrg=<optimized out>) at kernel/qapplication.cpp:812 #7 0x0000000000408f65 in main (argc=1, argv=0x7fffffffde58) at /home/ahmad/rpmbuild/dev/kwidgetsaddons/autotests/kdatetimeedittest.cpp:31
Comment Actions
Hmm,
❯ dbus-run-session bin/kdatetimeedittest ********* Start testing of KDateTimeEditTest ********* Config: Using QtTest library 5.15.0, Qt 5.15.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.2.1 20200130) PASS : KDateTimeEditTest::initTestCase() PASS : KDateTimeEditTest::_q_showIfNotHidden() PASS : KDateTimeEditTest::testDefaults() PASS : KDateTimeEditTest::testValidNull() PASS : KDateTimeEditTest::testDateTimeRange() PASS : KDateTimeEditTest::testOptions() PASS : KDateTimeEditTest::testDateDisplayFormat() PASS : KDateTimeEditTest::testDateList() PASS : KDateTimeEditTest::testTimeListInterval() PASS : KDateTimeEditTest::testTimeList() PASS : KDateTimeEditTest::testTimeDisplayFormat() PASS : KDateTimeEditTest::testCalendarSystem() PASS : KDateTimeEditTest::testTimeSpec() PASS : KDateTimeEditTest::testDateMenu() PASS : KDateTimeEditTest::cleanupTestCase() Totals: 15 passed, 0 failed, 0 skipped, 0 blacklisted, 817ms ********* Finished testing of KDateTimeEditTest *********
Comment Actions
Could be something on my system.... no idea what though. Sorry for the noise.
Anyway, the important thing is that the test passes on the CI system.
Comment Actions
Okay, that's good! We still have that qDeleteAll in ~ShadowHelper(), not sure what we have to do about it.