Bug 426502 - Okular occasionally crashes when opening PDF files
Summary: Okular occasionally crashes when opening PDF files
Status: RESOLVED DOWNSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.1
Platform: Mandriva RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-09-13 23:36 UTC by Bernhard Rosenkränzer
Modified: 2020-10-18 17:56 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
okular crash (12.08 KB, text/vnd.kde.kcrash-report)
2020-10-15 18:41 UTC, Angry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkränzer 2020-09-13 23:36:16 UTC
Application: okular (1.11.1)

Qt Version: 5.15.1
Frameworks Version: 5.74.0
Operating System: Linux 5.8.6-desktop-4omv4002 x86_64
Windowing system: X11
Distribution: "OpenMandriva Lx 4.2"

-- Information about the crash:
- What I was doing when the application crashed:

Clicked on a link to a PDF file in Falkon with Okular set as default PDF handler. Tried 3 times, Okular crashed 2 out of 3 times, succeeded once. Opened Okular manually and opened the file with File/Open, tried 3 times, got 2 successful opens and 1 crash.

This might be related to bug 425188 (similar but not 100% same symptom), but might also be a separate issue (rather different backtrace, but it might be the same underlying issue causing different crashes on rather different systems/versions).

Okular from release service 20.08.1, Plasma 5.19.5, Frameworks 5.74.0 with KIO 5.74.1, Qt 5.15.1

The crash can be reproduced sometimes.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fc2e71cbe23 in QTimer::stop() () from /usr/lib64/libQt5Core.so.5
#5  0x00007fc2cc4646d8 in PageView::slotRelayoutPages() () from /usr/lib64/qt5/plugins/okularpart.so
#6  0x00007fc2cc3c5d20 in PageView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib64/qt5/plugins/okularpart.so
#7  0x00007fc2e71b455e in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib64/libQt5Core.so.5
#8  0x00007fc2e71b6212 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#9  0x00007fc2e7ce391e in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007fc2e7d97795 in QAbstractScrollArea::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007fc2cc476e0d in PageView::event(QEvent*) () from /usr/lib64/qt5/plugins/okularpart.so
#12 0x00007fc2e7ca1bde in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007fc2e7ca3489 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007fc2e7180d3c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#15 0x00007fc2e718259e in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#16 0x00007fc2e71f0ee2 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#17 0x00007fc2e5511173 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#18 0x00007fc2e5511c13 in g_main_context_iterate () from /usr/lib64/libglib-2.0.so.0
#19 0x00007fc2e5511f0d in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#20 0x00007fc2e71f0270 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#21 0x00007fc2cf2f3ca6 in QXcbGlibEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5XcbQpa.so.5
#22 0x00007fc2e717c096 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#23 0x00007fc2e71814c1 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#24 0x00007fc2e7543716 in QGuiApplication::exec() () from /usr/lib64/libQt5Gui.so.5
#25 0x00007fc2e7ca3113 in QApplication::exec() () from /usr/lib64/libQt5Widgets.so.5
#26 0x00000000002133fa in main ()
[Inferior 1 (process 477242) detached]

The reporter indicates this bug may be a duplicate of or related to bug 425188.

Possible duplicates by query: bug 426297, bug 416280, bug 379809, bug 378696, bug 378135.

Reported using DrKonqi
Comment 1 Albert Astals Cid 2020-09-14 21:07:38 UTC
Any change you can get a backtrace with debug symbols?

AFAICS slotRelayoutPages doesn't call stop on any timer, it seems there's like some calls in the middle missing?
Comment 2 Angry 2020-10-15 18:40:53 UTC
Crashing for me too.

In most of cases when I right click on pdf file and click on open with okular.
First run = crash
Second run = no crash
another run = crash or not (randomly)

Same when I open pdf from webbrowser like Falkon.

When I open okular and open new documents (FILE/OPEN) then everytings works fine.

Okular: 20.08.2
Plasma: 5.20.0
K Frameworks  5.75.0
Qt 5.15.1
OS: OpenMandriva Cooker
Compiler: LLVM Clang 11

My crash log with installed debug symbols in attachment below.
BTW. I can;t run gdb to catch logs from crash If it crashing on right click (or maybe I can, but dont know how...).
Comment 3 Angry 2020-10-15 18:41:36 UTC
Created attachment 132393 [details]
okular crash
Comment 4 Laura David Hurka 2020-10-16 12:57:19 UTC
> AFAICS slotRelayoutPages doesn't call stop on any timer, it seems there's like some calls in the middle missing?

Looks the same to me. Maybe there are optimized calls from within PageView, like slotRelayoutPages() -> center() -> scrollTo(). I think scrollTo() stopped the animation timer before QScroller. But these crashes are after QScroller...

QScroller::scrollTo() probably calls stop() on its animation timer, but that should be visible in the backtrace, even with optimization, right?

@reporters:
Can you try whether Okular crashes when you enable tabs (Settings -> Configure Okular... -> General -> Features), and then open a second document with File -> Open...? If yes, it should be possible to get more details with gdb.
Comment 5 Bernhard Rosenkränzer 2020-10-16 13:40:44 UTC
Probably distro bug - we're reverting the QScroller use to work around bug 421780
Probably I missed something when rebasing the patch
Comment 6 Albert Astals Cid 2020-10-18 17:56:38 UTC
Distros making our like harder, that's exactly what we need, please don't do that.