Bug 383784 - Okular crash while opening PDF in MediaRendition::copy()
Summary: Okular crash while opening PDF in MediaRendition::copy()
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.1.3
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-21 11:56 UTC by Kyrylo Bohdanenko
Modified: 2017-08-23 16:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyrylo Bohdanenko 2017-08-21 11:56:11 UTC
Okular crashed while opening certain PDF (which I cannot publish here, however I can send it on request to an e-mail address privately).
Please find core file attached

Here's preview of backtrace (from GDB):
#0  0x00007fffd186ac67 in MediaRendition::copy() () from /usr/lib/x86_64-linux-gnu/libpoppler.so.58
#1  0x00007fffd1bb8e38 in ?? () from /usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1
#2  0x00007fffd1bdc77f in Poppler::FormField::activationAction() const () from /usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1
#3  0x00007fffd1e41990 in PopplerFormFieldButton::PopplerFormFieldButton (this=0xd67490, field=0xd56bd0) at /workspace/build/generators/poppler/formfields.cpp:36
#4  0x00007fffd1e3cc18 in PDFGenerator::addFormFields (this=this@entry=0xb92550, popplerPage=popplerPage@entry=0xbc71d0, page=page@entry=0xd54a10)
    at /workspace/build/generators/poppler/generator_pdf.cpp:1628
#5  0x00007fffd1e3dedd in PDFGenerator::loadPages (this=this@entry=0xb92550, pagesVector=..., rotation=rotation@entry=0, clear=clear@entry=false)
    at /workspace/build/generators/poppler/generator_pdf.cpp:658
#6  0x00007fffd1e3e457 in PDFGenerator::init (this=this@entry=0xb92550, pagesVector=..., password=...) at /workspace/build/generators/poppler/generator_pdf.cpp:583
#7  0x00007fffd1e3e603 in PDFGenerator::loadDocumentWithPassword (this=0xb92550, filePath=..., pagesVector=..., password=...) at /workspace/build/generators/poppler/generator_pdf.cpp:538
#8  0x00007fffd6dc6961 in ?? () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.7
#9  0x00007fffd6dc6e34 in Okular::Document::openDocument(QString const&, QUrl const&, QMimeType const&, QString const&) () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.7
#10 0x00007fffd70d432e in Okular::Part::doOpenFile (this=this@entry=0x72dca0, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7fffffffd59f)
    at /workspace/build/part.cpp:1292
#11 0x00007fffd70d56e6 in Okular::Part::openFile (this=0x72dca0) at /workspace/build/part.cpp:1414
#12 0x00007ffff7b97001 in ?? () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5
#13 0x00007ffff7b97f0c in KParts::ReadOnlyPart::openUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5
#14 0x00007fffd70c79d9 in Okular::Part::openUrl (this=0x72dca0, _url=...) at /workspace/build/part.cpp:1567
#15 0x00000000004127dc in Shell::openUrl (this=this@entry=0x731330, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:277
#16 0x00000000004150a6 in Shell::openDocument (this=this@entry=0x731330, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:218
#17 0x00000000004151d6 in Shell::openDocument (this=this@entry=0x731330, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:205
#18 0x000000000040c0bf in Okular::main (paths=..., serializedOptions=...) at /workspace/build/shell/okular_main.cpp:170
#19 0x000000000040bac3 in main (argc=2, argv=<optimized out>) at /workspace/build/shell/main.cpp:69
Comment 1 Kyrylo Bohdanenko 2017-08-21 11:57:29 UTC
Forgot to mention: the crash is caused by a received "Segmentation fault" signal:

Thread 1 "okular" received signal SIGSEGV, Segmentation fault.
0x00007fffd186ac67 in MediaRendition::copy() () from /usr/lib/x86_64-linux-gnu/libpoppler.so.58
Comment 2 Kyrylo Bohdanenko 2017-08-21 12:16:16 UTC
After installing debug sybols for libpoppler I've got this backtrace:
Core dump: https://www.dropbox.com/s/y5synleuap2jb5t/core.7924?dl=0

#0  MediaRendition::copy (this=0x0) at Rendition.cc:390
#1  0x00007fffd1bb8e38 in Poppler::PageData::convertLinkActionToLink (a=0xc8d9f0, parentDoc=<optimized out>, linkArea=...) at poppler-page.cc:208
#2  0x00007fffd1bdc77f in Poppler::FormField::activationAction (this=this@entry=0xd519d0) at poppler-form.cc:149
#3  0x00007fffd1e41990 in PopplerFormFieldButton::PopplerFormFieldButton (this=0xd63480, field=0xd519d0) at /workspace/build/generators/poppler/formfields.cpp:36
#4  0x00007fffd1e3cc18 in PDFGenerator::addFormFields (this=this@entry=0xb8e840, popplerPage=popplerPage@entry=0xbc3470, page=page@entry=0xd50a50)
    at /workspace/build/generators/poppler/generator_pdf.cpp:1628
#5  0x00007fffd1e3dedd in PDFGenerator::loadPages (this=this@entry=0xb8e840, pagesVector=..., rotation=rotation@entry=0, clear=clear@entry=false)
    at /workspace/build/generators/poppler/generator_pdf.cpp:658
#6  0x00007fffd1e3e457 in PDFGenerator::init (this=this@entry=0xb8e840, pagesVector=..., password=...) at /workspace/build/generators/poppler/generator_pdf.cpp:583
#7  0x00007fffd1e3e603 in PDFGenerator::loadDocumentWithPassword (this=0xb8e840, filePath=..., pagesVector=..., password=...) at /workspace/build/generators/poppler/generator_pdf.cpp:538
#8  0x00007fffd6dc6961 in ?? () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.7
#9  0x00007fffd6dc6e34 in Okular::Document::openDocument(QString const&, QUrl const&, QMimeType const&, QString const&) () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.7
#10 0x00007fffd70d432e in Okular::Part::doOpenFile (this=this@entry=0x72a070, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7fffffffd59f)
    at /workspace/build/part.cpp:1292
#11 0x00007fffd70d56e6 in Okular::Part::openFile (this=0x72a070) at /workspace/build/part.cpp:1414
#12 0x00007ffff7b97001 in ?? () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5
#13 0x00007ffff7b97f0c in KParts::ReadOnlyPart::openUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5
#14 0x00007fffd70c79d9 in Okular::Part::openUrl (this=0x72a070, _url=...) at /workspace/build/part.cpp:1567
#15 0x00000000004127dc in Shell::openUrl (this=this@entry=0x731b10, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:277
#16 0x00000000004150a6 in Shell::openDocument (this=this@entry=0x731b10, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:218
#17 0x00000000004151d6 in Shell::openDocument (this=this@entry=0x731b10, url=..., serializedOptions=...) at /workspace/build/shell/shell.cpp:205
#18 0x000000000040c0bf in Okular::main (paths=..., serializedOptions=...) at /workspace/build/shell/okular_main.cpp:170
#19 0x000000000040bac3 in main (argc=2, argv=<optimized out>) at /workspace/build/shell/main.cpp:69
Comment 3 Albert Astals Cid 2017-08-21 12:21:49 UTC
Can you please attach the file?
Comment 4 Kyrylo Bohdanenko 2017-08-21 12:45:54 UTC
As I've said: this file cannot be published (it is a paid copy of magazine). Thus, I will send the file to you via mail privately.
Comment 5 Albert Astals Cid 2017-08-21 15:44:26 UTC
Which poppler version are you using? seems ancient
Comment 6 Kyrylo Bohdanenko 2017-08-21 16:03:24 UTC
Yep, I'd expect it to be ancient, since KDE Neon uses Ubuntu 16.04 LTS as its base.

I.e. the version (according to `apt info libpoppler58`) is: 0.41.0-0ubuntu1.2
Comment 7 Kyrylo Bohdanenko 2017-08-21 16:40:41 UTC
Upgrading (lib)poppler to version 0.48.0-2ubuntu2.1 (from zesty/17.04) made the problem dissapear.

Built from here: https://packages.ubuntu.com/zesty/libpoppler-dev

Does this mean I should inform KDE Neon maintainers to update their poppler?
Comment 8 Albert Astals Cid 2017-08-21 21:23:05 UTC
Yes, you could tell either them or Ubuntu that the software they ship is old and crashy.

A note of warning, updating libpoppler only may cause some weirdness in programs that use it directly (libreoffice pdfimport and some others), i'm even surprised you could update it, i would have guessed that apt would have complained