<table><tr><td style="">abondrov added a comment.</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2283" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I have no idea whatsoever, i'm just reporting a patch that the distro maintainer says it's working, but I don't know why. putting it there to discuss and trying to understand</p></blockquote>

<p>It's working because with this patch Plasma doesn't try to delete the activity it's working with.</p>

<p>This way Plasma crashes (note that it tries to create containment for the activity destroyed with cont->destroy() earlier; also note that only panel containment tries to be created):<br />
-----not patched -----<br />
!!! checkActivities (status) 2 <br />
!!! checkActivities (id) "90960718-8ab6-460d-920d-3074a925c813" <br />
!!! checkActivities (destroyed activity): "c51bdf4c-5df8-4b04-9cf8-88a446ad2445" <br />
!!! load (containments are NOT empty, m_shell) "org.kde.plasma.desktop" <br />
!!! load (containmentType == panel) <br />
!!! createContainmentForActivity (activity) "c51bdf4c-5df8-4b04-9cf8-88a446ad2445" <br />
!!! createContainmentForActivity (screenNum) 0<br />
-----not patched -----</p>

<p>And this way it works (note that both panel and desktop try to be created):</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">patched -----</li>
</ul>

<p>!!! load (containments are NOT empty, m_shell) "org.kde.plasma.desktop" <br />
!!! load (containmentType == panel) <br />
!!! load (containmentType == desktop) <br />
!!! createContainmentForActivity (activity) "94bbf033-08f1-49ca-8f58-d1963a7d6415" <br />
!!! createContainmentForActivity (screenNum) 0</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">patched -----</li>
</ul>

<p>Maybe there's a better way to fix the crash. I hope you can reproduce it (it happens on first login, when there are no user configs yet). But for me (downstream distro) it's still better then nothing for now.</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2283" rel="noreferrer">https://phabricator.kde.org/D2283</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>mart, Plasma<br /><strong>Cc: </strong>abondrov, davidedmundson, plasma-devel, jensreuterberg, abetts, sebas<br /></div>