https://bugs.kde.org/show_bug.cgi?id=506064
Bug ID: 506064 Summary: plasmawindowed crashes with the systemtray applet Classification: Plasma Product: Plasma SDK Version First 6.4.0 Reported In: Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: plasmoidviewer Assignee: plasma-b...@kde.org Reporter: ch...@pineapple.cat CC: giorgos.tsiapalio...@kde.org Target Milestone: --- SUMMARY plasmawindowed crashes with the systemtray applet STEPS TO REPRODUCE 1. Simply run "plasmawindowed org.kde.plasma.systemtray" 2. It will segfault. There's a small chance that it may not crash on the first attempt. If that's the case, repeat the command and it definitely will crash. OBSERVED RESULT plasmawindowed crashes. EXPECTED RESULT plasmawindowed shouldn't crash. SOFTWARE/OS VERSIONS Reproduced on Gentoo with the following package versions: KDE Plasma Version: 6.4.0 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 Also reproducible on Arch Linux (definitely Plasma 6.4.0, although unable to confirm versions for other components at the moment) ADDITIONAL INFORMATION I know this is a niche use case. I apologize in advance if this wasting the team's time. I have traced the crash to the following line in plasma-workspace/applets/systemtray/systemtray.cpp, inside function SystemTray::restoreContents, at the line `m_plasmoidRegistry->init();` where m_plasmoidRegistry is null. If I place a guard around that call, i.e. making the line "if (m_plasmoidRegistry) m_plasmoidRegistry->init();", plasmawindowed still crashes with the following stack trace: #0 0x00007ffff7dc852e in Plasma::Corona::config() const () at /usr/lib64/libPlasma.so.6 #1 0x00007ffff7dbd101 in Plasma::Containment::restore(KConfigGroup&) () at /usr/lib64/libPlasma.so.6 #2 0x000055555555d25a in PlasmaWindowedCorona::loadApplet (this=0x555555a83870, applet=..., arguments=...) at ~/devel/git/plasma-workspace/plasma-windowed/plasmawindowedcorona.cpp:66 the line in PlasmaWindowedCorona::loadApplet being "a->restore(cg);". It appears that inside Plasma::Containment::restore, "corona()" returned null. So inserting "a->setParent(this);" before that line in PlasmaWindowedCorona::loadApplet fixed the issue, and plasmawindowed no longer crashes from this point. An alternative working solution to the first part of the issue is to instantiate m_settings and m_plasmoidRegistry if they are null when the latter is used in SystemTray::restoreContents. SystemTray::init will also be changed accordingly to avoid creating them twice. I'm not submitting a patch because I have no idea whether these modifications are the proper solution, but I will do so if the team deems that they are. -- You are receiving this mail because: You are watching all bug changes.