Created attachment 111885 [details] demo file Just opening the attached .xps file makes Okular crash. Version is master branch today (revision b25979121fd3f28788a2958b0faed250f1d1054c) Backtrace: #0 0x00007f99642bd89c in loadEntry(KZip*, QString const&, Qt::CaseSensitivity) [clone .constprop.299] () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #1 0x00007f99642c2d6b in XpsPage::loadImageFromFile(QString const&) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #2 0x00007f99642c301c in XpsHandler::processImageBrush(XpsRenderNode&) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #3 0x00007f99642c3b0e in XpsHandler::processEndElement(XpsRenderNode&) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #4 0x00007f99642c425d in XpsHandler::endElement(QString const&, QString const&, QString const&) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #5 0x00007f99876dc478 in ?? () from /usr/lib/libQt5Xml.so.5 #6 0x00007f99876e58ff in ?? () from /usr/lib/libQt5Xml.so.5 #7 0x00007f99876e4e48 in ?? () from /usr/lib/libQt5Xml.so.5 #8 0x00007f99876e5880 in ?? () from /usr/lib/libQt5Xml.so.5 #9 0x00007f99876e4e48 in ?? () from /usr/lib/libQt5Xml.so.5 #10 0x00007f99876e5880 in ?? () from /usr/lib/libQt5Xml.so.5 #11 0x00007f99876e4e48 in ?? () from /usr/lib/libQt5Xml.so.5 #12 0x00007f99876e5880 in ?? () from /usr/lib/libQt5Xml.so.5 #13 0x00007f99876e845c in ?? () from /usr/lib/libQt5Xml.so.5 #14 0x00007f99876e8977 in QXmlSimpleReader::parse(QXmlInputSource const*, bool) () from /usr/lib/libQt5Xml.so.5 #15 0x00007f99642c2850 in XpsPage::renderToPainter(QPainter*) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #16 0x00007f99642c2a32 in XpsPage::renderToImage(QImage*) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #17 0x00007f99642c2b4d in XpsGenerator::image(Okular::PixmapRequest*) () from /usr/lib/qt/plugins/okular/generators/okularGenerator_xps.so #18 0x00007f996eca15f5 in Okular::PixmapGenerationThread::run() () from /usr/lib/libOkular5Core.so.9 #19 0x00007f9988883acd in ?? () from /usr/lib/libQt5Core.so.5 #20 0x00007f998517508c in start_thread () from /usr/lib/libpthread.so.0 #21 0x00007f998818be7f in clone () from /usr/lib/libc.so.6 If the backtrace in the Qt5 libs is needed, I can recompile it.
Git commit 985e06a2f572236df9637e9590231b4caa2628ea by Albert Astals Cid. Committed on 08/04/2018 at 10:50. Pushed by aacid into branch 'Applications/18.04'. Fix crash in some more xps files Some more tweaks to path resolving. Don't prepend a / in entryPath if path already starts with / Fonts can also have relative paths, so use the absolutePath before calling getFontByName M +21 -16 generators/xps/generator_xps.cpp M +1 -0 generators/xps/generator_xps.h https://commits.kde.org/okular/985e06a2f572236df9637e9590231b4caa2628ea
Thanks for the quick fix! :)
You're welcome :)