Created attachment 135519 [details] example app SUMMARY I have a QML application (https://github.com/g-fb/haruna) where I set QApplication::setStyle("Breeze") (because of this https://bugs.kde.org/show_bug.cgi?id=430667) and I also have an option to change the color scheme through KColorSchemeManager. This worked well before 5.21 beta, but on 5.21 beta it crashes. STEPS TO REPRODUCE 1. Download example app 2. Build 3. Run OBSERVED RESULT Application crashes when run EXPECTED RESULT No crash SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20210205 KDE Plasma Version: 5.21.80 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 Kernel Version: 5.10.12-1-default (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 2600 Six-Core Processor Memory: 15,6 GiB of RAM Graphics Processor: GeForce GTX 750 Ti/PCIe/SSE2 ADDITIONAL INFORMATION Example app backtrace https://invent.kde.org/-/snippets/1493
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/81
Git commit 5de36bd1381b1d755c8f2dd4b95b9758d3225b14 by David Redondo. Committed on 09/02/2021 at 10:53. Pushed by davidre into branch 'master'. Clean up listener If the style is unloaded for example by an application dynamically switching styles, the listener was still around leading us to call into destroyed objects when the color scheme was changed. M +1 -1 kstyle/breezetoolsareamanager.cpp M +1 -0 kstyle/breezetoolsareamanager.h https://invent.kde.org/plasma/breeze/commit/5de36bd1381b1d755c8f2dd4b95b9758d3225b14
Git commit 12e42f014338cce6a6d706a222a2f4af4bbb49b2 by David Redondo. Committed on 09/02/2021 at 15:54. Pushed by davidre into branch 'Plasma/5.21'. Clean up listener If the style is unloaded for example by an application dynamically switching styles, the listener was still around leading us to call into destroyed objects when the color scheme was changed. (cherry picked from commit 5de36bd1381b1d755c8f2dd4b95b9758d3225b14) M +1 -1 kstyle/breezetoolsareamanager.cpp M +1 -0 kstyle/breezetoolsareamanager.h https://invent.kde.org/plasma/breeze/commit/12e42f014338cce6a6d706a222a2f4af4bbb49b2
The same fix also helped with digikam 7.2.0-rc, where I saw crashes due to colorscheme switches, see https://bugs.kde.org/show_bug.cgi?id=432646