<table><tr><td style="">jtamate retitled this revision from "Possible solution to bug 364039" to "Don't remove a subjob if is not in the list of subjobs and dnoe emitResult if the job still has subjobs..".<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-kwz6qcorn2ursuf/" rel="noreferrer">(Show Details)</a><br />jtamate edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-vlg64fifb7p7w7a/" rel="noreferrer">(Show Details)</a>
</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/D9001" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">This is my first phabricator revision, I hope I'm doing it right.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Fix for BUG: 364039</span><br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">First part of the patch</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">After placing traces</span> in <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">kcoreaddons.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">some destructors,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Don't remove a child if it is not in the list of children</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">I realized that the SubJob being removed was already deleted</span>.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Second part in kio.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Then, I tried with the patch for kcoreaddons, that simply does: Don't remove a subjob if it is not in the list of subjobs.<br />
Unfortunately, it moved the crash to another part, because the job was already finished by a previous emitResult,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Don't emitResult</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">but it still has active subjobs</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">that will delete the job</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">therefore the second part in KIO: Don't emitResult</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">if the job has subjobs.<br />
<br />
It fixes the crash for me as I was able to reproduce it and I can't</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">that will also finish and delete the job, if the job still has subjobs</span>.<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">I hope it doesn't int</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">It fixes the crash for me as I was able to rep</span>roduce<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> it</span> any<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> leak.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">time and now I can't.<br />
</span><br />
</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Using a filesystem where you can not change file rights (for example ntfs), move a file from a ext4 folder to that filesystem. The "can not change permissions" dialog appears, with options to retry or cancel. Press retry, a new dialog saying it can not move the original file because it does not exists appears, press retry more than 3 times, then cancel.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Reproducing the steps in the bug report,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">B</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">b</span>efore I got a crash, now I can do <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">this</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">it</span> several times without crash<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">ing</span>.</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9001" rel="noreferrer">https://phabricator.kde.org/D9001</a></div></div><br /><div><strong>To: </strong>jtamate, Frameworks, dfaure<br /><strong>Cc: </strong>ltoscano<br /></div>