Created attachment 119786 [details] Problematic PDF SUMMARY The EPub generator wraps the page content with a html table, and after QTextDocument::setHtml(...) the pageCount() is -42192. This later leads to crashes when the page number is used as an array index. Removing the wrapping table from the firstpage code path avoids the bad behavior. The problematic PDF is the one from https://bugs.kde.org/show_bug.cgi?id=406116, but with the bad navPoint entries removed. According to EPubCheck, the fixed file is wellformed. STEPS TO REPRODUCE 1. Try to open the attached EPub with okular. OBSERVED RESULT Crash SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20190428 KDE Plasma Version: 19.04.00 KDE Frameworks Version: 5.57 Qt Version: 5.12 ADDITIONAL INFORMATION
That's not a pdf ;) This is most probably a duplicate of 406738 Do you have time to check?
(In reply to Albert Astals Cid from comment #1) > That's not a pdf ;) > > This is most probably a duplicate of 406738 > > Do you have time to check? The backtrace is the same.
Git commit 9f98c010691ed73d11c83a1694823aba60b12e32 by Albert Astals Cid, on behalf of Stefan Brüns. Committed on 22/05/2019 at 22:24. Pushed by aacid into branch 'Applications/19.04'. [EPubGenerator] Avoid crashes due to bogus wrapping of content in table Summary: QTextDocument chokes badly when a some documents are wrapped inside a table, returning e.g. a pagecount of -41292 afterwards. On the downside, this removes any padding from the page. On the upside, it removes any padding from the page. Related: bug 406738, bug 406116 Reviewers: #okular Subscribers: okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D20949 M +1 -7 generators/epub/converter.cpp https://commits.kde.org/okular/9f98c010691ed73d11c83a1694823aba60b12e32
https://bugreports.qt.io/browse/QTBUG-73730