Bug 443255 - Okular crashes when opening PDF file
Summary: Okular crashes when opening PDF file
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.04.2
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2021-10-03 12:01 UTC by Vicente Salvador
Modified: 2021-10-09 08:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08.3
Sentry Crash Report:


Attachments
PDF Document to reproduce crash (891.33 KB, application/pdf)
2021-10-03 12:02 UTC, Vicente Salvador
Details
New crash information added by DrKonqi (5.96 KB, text/plain)
2021-10-03 21:11 UTC, Tony
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Salvador 2021-10-03 12:01:16 UTC
Application: okular (21.04.2)

Qt Version: 5.15.2
Frameworks Version: 5.85.0
Operating System: Linux 5.14.9-300.fc35.x86_64 x86_64
Windowing System: Wayland
Drkonqi Version: 5.22.5
Distribution: "Fedora release 35 (Thirty Five)"

-- Information about the crash:
- What I was doing when the application crashed:
Opening a PDF file generated by accounting software.

This crash is specific to all invoices PDFs generated by this software.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7fdbf0d06500 (LWP 423634))]
[KCrash Handler]
#6  0x00007fdbe12f6765 in qToStringViewIgnoringNull<QString, true> (s=..., s=...) at /usr/include/qt5/QtCore/qstringview.h:381
#7  QtPrivate::qStringLikeToArg (s=..., s=...) at /usr/include/qt5/QtCore/qstring.h:2114
#8  QStringView::arg<QString const&, QString const&, QString const&, QString const&, QString const&, QString const&> (this=<optimized out>, this=<optimized out>) at /usr/include/qt5/QtCore/qstring.h:2125
#9  QString::arg (this=0x7ffcc3b3a468, this=0x7ffcc3b3a468, a6=..., a5=..., a4=..., a3=..., a2=..., a1=...) at /usr/include/qt5/QtCore/qstring.h:1136
#10 printd (context=<optimized out>, arguments=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/core/script/kjs_util.cpp:97
#11 0x00007fdbe10e2bb1 in KJSCustomFunction::callAsFunction (this=0x55eec05123c0, exec=0x7ffcc3b3a5b0, thisObj=<optimized out>, args=...) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/api/kjsprototype.cpp:130
#12 0x00007fdbe0f8a01c in KJS::JSObject::call (args=..., thisObj=<optimized out>, exec=<optimized out>, this=<optimized out>, this=<optimized out>, exec=<optimized out>, thisObj=<optimized out>, args=...) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/object.h:689
#13 KJS::Machine::runBlock (exec=0x7ffcc3b3a7e0, codeBlock=..., parentExec=0x0) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/redhat-linux-build/src/kjs/codes.def:1239
#14 0x00007fdbe0f3f505 in KJS::FunctionBodyNode::execute (this=0x55eec0540dc0, exec=0x7ffcc3b3a7e0) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/nodes.cpp:944
#15 0x00007fdbe0f796b0 in KJS::Interpreter::evaluate (this=0x55eec04e83c0, sourceURL=..., startingLineNumber=1, code=0x7ffcc3b3a7e0, codeLength=<optimized out>, thisV=0x55eec0510080) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/interpreter.cpp:583
#16 0x00007fdbe0f799cd in KJS::Interpreter::evaluate (this=this@entry=0x55eec04e83c0, sourceURL=..., startingLineNumber=startingLineNumber@entry=1, code=<optimized out>, codeLength=<optimized out>, thisV=0x55eec0510080) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/interpreter.cpp:599
#17 0x00007fdbe0f79a27 in KJS::Interpreter::evaluate (this=this@entry=0x55eec04e83c0, sourceURL=..., startingLineNumber=startingLineNumber@entry=1, code=..., thisV=thisV@entry=0x55eec0510080) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/interpreter.cpp:518
#18 0x00007fdbe10e30ef in KJSInterpreter::evaluate (this=<optimized out>, sourceURL=..., startingLineNumber=startingLineNumber@entry=1, code=..., thisValue=<optimized out>) at /usr/src/debug/kf5-kjs-5.85.0-1.fc35.x86_64/src/kjs/api/kjsinterpreter.cpp:180
#19 0x00007fdbe12c4832 in Okular::ExecutorKJS::execute (event=0x0, script=..., this=<optimized out>) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/core/script/executor_kjs.cpp:113
#20 Okular::Scripter::execute (this=<optimized out>, type=<optimized out>, script=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/core/scripter.cpp:69
#21 0x00007fdbe12984ca in Okular::Document::openDocument (this=this@entry=0x55eebfd45870, docFile=..., url=..., _mime=..., password=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/core/document.cpp:2451
#22 0x00007fdbe14018c5 in Okular::Part::doOpenFile (this=this@entry=0x55eebfcd7200, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7ffcc3b3ae47) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/part/part.cpp:1391
#23 0x00007fdbe14041ab in Okular::Part::openFile (this=0x55eebfcd7200) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/part/part.cpp:1509
#24 0x00007fdbf69872e5 in KParts::ReadOnlyPartPrivate::openLocalFile (this=this@entry=0x55eebfcd3370) at /usr/src/debug/kf5-kparts-5.85.0-1.fc35.x86_64/src/readonlypart.cpp:180
#25 0x00007fdbf698bb27 in KParts::ReadOnlyPart::openUrl (this=this@entry=0x55eebfcd7200, url=...) at /usr/src/debug/kf5-kparts-5.85.0-1.fc35.x86_64/src/readonlypart.cpp:141
#26 0x00007fdbe14024fb in Okular::Part::openUrl (this=<optimized out>, _url=..., swapInsteadOfOpening=<optimized out>) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/part/part.cpp:1741
#27 0x000055eebf24381b in Shell::openUrl (this=<optimized out>, url=..., serializedOptions=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/shell/shell.cpp:289
#28 0x000055eebf248bd2 in Shell::openDocument (this=0x55eebfcd46d0, url=..., serializedOptions=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/shell/shell.cpp:240
#29 0x000055eebf23fe81 in Shell::openDocument (serializedOptions=..., url=..., this=0x55eebfcd46d0) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/shell/okular_main.cpp:162
#30 Okular::main (serializedOptions=..., paths=...) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/shell/okular_main.cpp:166
#31 main (argc=<optimized out>, argv=0x7ffcc3b3b3e0) at /usr/src/debug/okular-21.04.2-2.fc35.x86_64/shell/main.cpp:95
[Inferior 1 (process 423634) detached]

Possible duplicates by query: bug 443057, bug 440841, bug 440840, bug 440377, bug 440343.

Reported using DrKonqi
Comment 1 Vicente Salvador 2021-10-03 12:02:39 UTC
Created attachment 142117 [details]
PDF Document to reproduce crash
Comment 2 Tony 2021-10-03 21:11:38 UTC
Created attachment 142128 [details]
New crash information added by DrKonqi

okular (21.11.70) using Qt 5.15.2

- What I was doing when the application crashed:
Opened the attached PDF file in order to reproduce the crash.

-- Backtrace (Reduced):
#6  0x00007f22753dc3f1 in qToStringViewIgnoringNull<QString, true> (s=...) at /usr/include/qt5/QtCore/qstringview.h:381
#7  QtPrivate::qStringLikeToArg (s=...) at /usr/include/qt5/QtCore/qstring.h:2118
#8  QStringView::arg<QString const&, QString const&, QString const&, QString const&, QString const&, QString const&> (this=<optimized out>, this=<optimized out>) at /usr/include/qt5/QtCore/qstring.h:2129
#9  QString::arg (this=0x7ffd62fcb148, this=0x7ffd62fcb148, a6=..., a5=..., a4=..., a3=..., a2=..., a1=...) at /usr/include/qt5/QtCore/qstring.h:1136
#10 printd (context=<optimized out>, arguments=...) at /usr/src/debug/okular-21.11.70git.20211001T193123~a40849988-ku.34.1.x86_64/core/script/kjs_util.cpp:94
Comment 3 Bug Janitor Service 2021-10-05 20:56:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/494
Comment 4 Albert Astals Cid 2021-10-05 22:09:50 UTC
Git commit 913560eb78078ddd2b7e543d4cb26925c0d432e1 by Albert Astals Cid.
Committed on 05/10/2021 at 20:55.
Pushed by aacid into branch 'release/21.08'.

util.printd: Don't crash if we get an unexpected oDate argument

M  +6    -0    core/script/kjs_util.cpp

https://invent.kde.org/graphics/okular/commit/913560eb78078ddd2b7e543d4cb26925c0d432e1
Comment 5 Albert Astals Cid 2021-10-06 21:36:19 UTC
We're late for .2
Comment 6 Vicente Salvador 2021-10-09 08:05:56 UTC
I know this is not a normal behaviour, but, as this is my first bug reported, I just want to say "Thank you very much".