<table><tr><td style="">davidedmundson created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</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/D8285" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>KIdleTime is a global static, it's destructor it deletes the backend in<br />
a deleteLater; This is *after* the app has been deleted.</p>

<p>This means we end up deleting Poller's ConnectionThread after the static<br />
QVector managing the ConnectionThreads in the main app has been deleted,<br />
leading to a confusing crash.</p>

<p>We can fix this by deleting the connection thread in unload rather than<br />
the actual object destruction.</p>

<p>This fixes a crash on app close, most notably the recursive drkonqi<br />
crash.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Verified what was happening by subclassing the vector and adding debug<br />
Had the drkonqi crash loop, made this change, no more crashes</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R130 Frameworks integration plugin using KWayland</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8285" rel="noreferrer">https://phabricator.kde.org/D8285</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/idletime/poller.cpp<br />
src/idletime/poller.h</div></div></div><br /><div><strong>To: </strong>davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>