<table><tr><td style="">rkflx requested changes to this revision.<br />rkflx added a comment.<br />This revision now requires changes to proceed.
</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/D9328" 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;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><ol class="remarkup-list" start="5">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ASSERT: "page()" in file okular/core/generator_p.cpp, line 129</tt> (Happened two times already, but not everytime.)</li>
</ol></blockquote>

<p>You got this one changing the size of the sidebar?</p></blockquote>

<p>That's correct. Now I even have somewhat reliable steps to reproduce (you'd still need a bit of luck, though). <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Open</span></span></span> the document and while it is rendering resize the sidebar so X gets stuck, then wait for the <tt style="background: #ebebeb; font-size: 13px;">ASSERT</tt>:</p>

<p><a href="https://phabricator.kde.org/F5676036" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">F5676036: assert-after-resize.webm</a></p>

<p>Also, the <tt style="background: #ebebeb; font-size: 13px;">ASSERT</tt> problem is not unique to vector heavy documents like <tt style="background: #ebebeb; font-size: 13px;">dublin-center-street.pdf</tt>, I get it too for an image heavy 50 page document while holding <kbd style="display: inline-block; min-width: 1em; padding: 4px 5px 5px; font-weight: normal; font-size: 0.8rem; text-align: center; text-decoration: none; line-height: 0.6rem; border-radius: 3px; box-shadow: inset 0 -1px 0 rgba(71, 87, 120, 0.08); user-select: none; background: #f7f7f7; border: 1px solid #C7CCD9;">Space</kbd> to scroll until it crashes. After reopening the document, Okular would even crash immediately then, meaning this probably has nothing to do with the stuck sidebar (which is only the trigger in one case).</p>

<p>In fact, scrolling in almost every multipage document triggers the problem, which is quite serious. This was not there before (I checked specifically by only undoing the Okular patch).</p>

<hr class="remarkup-hr" />

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><ol class="remarkup-list" start="6">
<li class="remarkup-list-item">Text page generation not cancellable</li>
</ol></blockquote>

<p>cancel text extraction on document close</p></blockquote>

<p>I'm still not sure whether it's not working correctly or I'm not understanding what "cancelling" means. In the following video, I <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Close</span></span></span> during rendering (immediate reaction) and then I <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Close</span></span></span> during text extraction (long delay):</p>

<p><a href="https://phabricator.kde.org/F5676037" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">F5676037: close-not-cancelling.webm</a></p>

<p>To me this looks like text extraction in just one huge uninterruptible chunk, and only after it has finished Okular will react with whatever I wanted to do (in this case <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Close</span></span></span>). The same happens for <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Zoom In</span></span></span>, where text extraction is not "stopped" and thus I get to see the pixelated rendering for quite a while (I did not test any other actions yet):</p>

<p><a href="https://phabricator.kde.org/F5676039" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">F5676039: zoom-not-cancelling.webm</a></p>

<hr class="remarkup-hr" />

<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'll finalize testing […] tomorrow.</p></blockquote>

<p>Done. Other than the issues noted above I did not find any additional oddities or crashes when testing more extensively (different documents, more features).</p>

<p>(In HiDPI mode we still have those  double redrawing / no redrawing problems, but those are unrelated to this patch. Mentioning it only so that nobody testing in HiDPI mode gets confused.)</p>

<p>I'm setting the status to "Changes requested" for now, because the crashes happen for almost every scientific document I tested (we have lots of users in this area) and apply to a Release build too. Apart from that, the overall state of the patch is quite good.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9328" rel="noreferrer">https://phabricator.kde.org/D9328</a></div></div><br /><div><strong>To: </strong>aacid, ervin, rkflx<br /><strong>Cc: </strong>rkflx, ervin, michaelweghorn, ngraham, Okular, aacid<br /></div>