<table><tr><td style="">fifr 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/D27385">View Revision</a></tr></table><br /><div><div><p>Well, the main problem for me is that I do not know what <tt style="background: #ebebeb; font-size: 13px;">waitForAnswer</tt> is supposed to to and in which situation it is supposed to be called. The assumptions that I made are the following:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">it is called to receive an answer after some kind of command (that should trigger the answer from peer) has been invoked</li>
<li class="remarkup-list-item">this answer is potentially received from an external source, e.g. a network connection (it's some KIO code in the end ...)</li>
<li class="remarkup-list-item">the validity of this answer has not been verified before, i.e. it could be possible that the incoming data is wrong (e.g. transmission error of any kind)</li>
</ul>
<p>Therefore, the call to <tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> is basically (part of) the verification that the incoming data is correct.</p>
<p>The real question, that I simply cannot answer, is whether it should be <strong>logically</strong> impossible that <tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> returns false in this case. Only then aborting with <tt style="background: #ebebeb; font-size: 13px;">qFatal</tt> would be justified (in my opinion), otherwise the case that <tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> returns false should be handled properly, not just aborting.</p>
<p>My problem is that I do not understand the underlying architecture of the code <strong>at all</strong>. So I hoped that someone who knows the code could comment on whether it is logically possible (given that for whatever reason invalid data has been received by the call to <tt style="background: #ebebeb; font-size: 13px;">d->appConnection.read(&cmd, data)</tt> a few lines above) that <tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> fails or not. For me this judgement is impossible. Even if I could reproduce the error reliably (should be possible at least on my system, but whole architecture seems to be very complex so that I do not even know where to start) I would not know whether the problem is here in this code (<tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> could fail) or somewhere else (<tt style="background: #ebebeb; font-size: 13px;">isSubCommand</tt> must not fail), because I do not know how it is <strong>supposed to be</strong>.</p>
<p>After all, I would be very happy to assist and provide further information, I just do not know what to do.</p>
<p>Btw: I've been using this patch for several weeks now and the problem vanished completely.</p></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/D27385">https://phabricator.kde.org/D27385</a></div></div><br /><div><strong>To: </strong>fifr, Frameworks, dfaure, meven<br /><strong>Cc: </strong>broulik, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>