Bug 420656 - segfault when opening some pdfs
Summary: segfault when opening some pdfs
Status: RESOLVED DUPLICATE of bug 407338
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.9.3
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-27 10:33 UTC by Gaëtan Gilbert
Modified: 2020-04-27 10:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
segfaulting pdf (77.82 KB, application/pdf)
2020-04-27 10:33 UTC, Gaëtan Gilbert
Details
kcrash report (13.21 KB, text/plain)
2020-04-27 10:34 UTC, Gaëtan Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gaëtan Gilbert 2020-04-27 10:33:20 UTC
Created attachment 127917 [details]
segfaulting pdf

SUMMARY

I have a few pdfs on which okular crashes with a segfault.
All of them are from the same source (Inria), I tried random other pdfs which all worked fine.

Other programs (the other pdfs always worked fine):
- evince opens them without issue
- the calibre ebook viewer fails to open and says "failed to initialize plugin DeDRM [some trace] UnicodeEncodeError: 'utf-8' codec can't encode character '\udc90' in position 6: surrogates not allowed"
- libreoffice says "the signature is OK but the certificate could not be validated", clicking "show signatures" makes it complain about non existing XXXX.tmp files in the pdf's directory

So the issue seems linked to signatures but I don't know enough about how that stuff works to be sure.

STEPS TO REPRODUCE
1. open attached file
2. witness crash

OBSERVED RESULT

crash

EXPECTED RESULT

view pdf

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: linux 3.3.0-2-amd64
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.5
Comment 1 Gaëtan Gilbert 2020-04-27 10:34:18 UTC
Created attachment 127918 [details]
kcrash report
Comment 2 Gaëtan Gilbert 2020-04-27 10:36:48 UTC
BTW there was no crash in late january on these pdfs (last date I can be sure I tried opening them). 
I don't know what software versions I had then, I guess whatever debian testing had.
Comment 3 Yuri Chornoivan 2020-04-27 10:43:03 UTC
Regretfully, your poppler library is too old. The bug was fixed since then (at least this file does not crash my Okular with poppler 0.87).

The reason that the earlier versions of Okular do not crash is that the new version starts to handle digital signatures.

You can try to patch poppler (or ask Debian maintainers to do so). The patch is tiny.

https://gitlab.freedesktop.org/poppler/poppler/commit/eaeac5c7dba6f53acef3f0be6b226facecfc5f28.diff

Sorry. Hope this helps.

*** This bug has been marked as a duplicate of bug 407338 ***
Comment 4 Gaëtan Gilbert 2020-04-27 10:48:56 UTC
Thanks, upgrading libpoppler-qt5-1 to 0.85 from debian experimental worked so debian maintainers are already on it.