Bug 396326 - Crash on right-click over a specific section of the TOC of a specific document
Summary: Crash on right-click over a specific section of the TOC of a specific document
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
: 397800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-08 23:39 UTC by Luigi Toscano
Modified: 2018-12-30 15:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (5.67 KB, text/plain)
2018-12-22 06:57 UTC, Jett Husher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Toscano 2018-07-08 23:39:55 UTC
Application: okular (1.4.70)
 (Compiled from sources)
Qt Version: 5.10.1
Frameworks Version: 5.47.0
Operating System: Linux 4.16.0-2-amd64 x86_64
Distribution: Debian GNU/Linux testing (buster)

-- Information about the crash:
- What I was doing when the application crashed:
Open the following document:
https://education.ti.com/~/media/4FE3911D94A041E28095C140297E1062

Right clicking on any entry related to Appendix B of the Table of Context leads to the crash whose traceback is attached.
The traceback seems to hint that the page number is not properly discovered.
It is worth noting than a left click on the same entries which cause the crash do not move the viewport. Clicking other entries of the TOC moves the viewport to the relevant point as expected.

It was originally reported by another user with compiled packages (Okular 1.4.2, Frameworks 5.43, Qt 5.10.1, poppler 0.63) on VoidLinux.
Reproduced with a self-compiled Okular 1.4.70 (current git master), Frameworks 5.47, Qt 5.10.1, poppler 0.63 (the last two from Debian testing).

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f8de7b53840 (LWP 9142))]

Thread 4 (Thread 0x7f8db5c29700 (LWP 9397)):
#0  0x00007f8de19075d9 in __GI___poll (fds=0x7f8db000b0d0, nfds=1, timeout=8697) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8ddcc2a439 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8ddcc2a54c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8de27f21bb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f8de2795b6a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8de25ab7ea in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f8de25b0b4f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f8ddf85e5aa in start_thread (arg=0x7f8db5c29700) at pthread_create.c:463
#8  0x00007f8de1911cbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f8dbd306700 (LWP 9154)):
#0  0x00007f8ddf8644ec in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55d7990ba700) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55d7990ba6b0, cond=0x55d7990ba6d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55d7990ba6d8, mutex=0x55d7990ba6b0) at pthread_cond_wait.c:655
#3  0x00007f8dbdf94cdb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f8dbdf94a07 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f8ddf85e5aa in start_thread (arg=0x7f8dbd306700) at pthread_create.c:463
#6  0x00007f8de1911cbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f8dcb74c700 (LWP 9149)):
#0  0x00007f8ddcc6fcf0 in g_mutex_unlock () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f8ddcc2a42e in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8ddcc2a54c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8de27f21bb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f8de2795b6a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8de25ab7ea in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f8de2c15df5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f8de25b0b4f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f8ddf85e5aa in start_thread (arg=0x7f8dcb74c700) at pthread_create.c:463
#9  0x00007f8de1911cbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f8de7b53840 (LWP 9142)):
[KCrash Handler]
#6  0x00007f8dc9c48912 in Okular::Page::number() const () from /opt/kf5/lib/x86_64-linux-gnu/libOkular5Core.so.9
#7  0x00007f8dc9f9ff0e in Okular::Part::showMenu(Okular::Page const*, QPoint const&, QString const&, Okular::DocumentViewport const&) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#8  0x00007f8dc9f9fd21 in Okular::Part::slotShowTOCMenu(Okular::DocumentViewport const&, QPoint const&, QString const&) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#9  0x00007f8dc9fae29e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<Okular::DocumentViewport const&, QPoint const&, QString const&>, void, void (Okular::Part::*)(Okular::DocumentViewport const&, QPoint const&, QString const&)>::call(void (Okular::Part::*)(Okular::DocumentViewport const&, QPoint const&, QString const&), Okular::Part*, void**) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#10 0x00007f8dc9fad2da in void QtPrivate::FunctionPointer<void (Okular::Part::*)(Okular::DocumentViewport const&, QPoint const&, QString const&)>::call<QtPrivate::List<Okular::DocumentViewport const&, QPoint const&, QString const&>, void>(void (Okular::Part::*)(Okular::DocumentViewport const&, QPoint const&, QString const&), Okular::Part*, void**) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#11 0x00007f8dc9fab8a9 in QtPrivate::QSlotObject<void (Okular::Part::*)(Okular::DocumentViewport const&, QPoint const&, QString const&), QtPrivate::List<Okular::DocumentViewport const&, QPoint const&, QString const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#12 0x00007f8de27c72af in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f8dca070375 in TOC::rightClick(Okular::DocumentViewport const&, QPoint const&, QString const&) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#14 0x00007f8dca06ffb5 in TOC::contextMenuEvent(QContextMenuEvent*) () from /opt/kf5/lib/x86_64-linux-gnu/plugins/okularpart.so
#15 0x00007f8de3a7a15a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f8de3a3a6cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f8de3a42bee in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f8de2797938 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f8de3a94608 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f8de3a96b09 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f8de3a3a6cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f8de3a41e84 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f8de2797938 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f8de3249603 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007f8de324b0d5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#26 0x00007f8de322303b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#27 0x00007f8dd7d4e2cb in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#28 0x00007f8de2795b6a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f8de279eed4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x000055d797725673 in main ()

Reported using DrKonqi
Comment 1 Albert Astals Cid 2018-07-09 22:50:23 UTC
Git commit 14dc396cdb110b35cc76864ca8397586dbd9b81e by Albert Astals Cid.
Committed on 09/07/2018 at 22:49.
Pushed by aacid into branch 'Applications/18.04'.

Do not crash on right-click on TOC item with no associated page

M  +1    -1    core/document.cpp

https://commits.kde.org/okular/14dc396cdb110b35cc76864ca8397586dbd9b81e
Comment 2 Albert Astals Cid 2018-08-23 21:46:50 UTC
*** Bug 397800 has been marked as a duplicate of this bug. ***
Comment 3 Jett Husher 2018-12-22 06:57:56 UTC
Created attachment 117054 [details]
New crash information added by DrKonqi

okular (1.3.2) using Qt 5.11.2

- What I was doing when the application crashed:

Right click on any item in the contents section crashes Okular. The document where it happens: https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

-- Backtrace (Reduced):
#6  0x00007f4674f9f700 in Okular::Page::number() const () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.8
#7  0x00007f46750c3723 in Okular::Part::showMenu(Okular::Page const*, QPoint const&, QString const&, Okular::DocumentViewport const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
[...]
#9  0x00007f467515f85f in TOC::rightClick(Okular::DocumentViewport const&, QPoint const&, QString const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#10 0x00007f467515fa20 in TOC::contextMenuEvent(QContextMenuEvent*) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#11 0x00007f46844317c8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
Comment 4 Oliver Sander 2018-12-30 15:45:27 UTC
Jett, your Okular version is not new enough to include the fix of Comment 2.  Please update to a very recent Okular, and open a new report if you still see the bug.