Bug 398334 - Okular crashes while un/re highlighting PDF file
Summary: Okular crashes while un/re highlighting PDF file
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-09-06 18:33 UTC by T. Zack Crawford
Modified: 2018-11-12 16:05 UTC (History)
1 user (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 T. Zack Crawford 2018-09-06 18:33:28 UTC
--Software Versions

Application: okular (1.5.1)
KDE Frameworks 5.49.0
Qt 5.11.1 (built against 5.11.1)
Operating System: 4.18.5-arch1-1-ARCH (Linux kernel 4.18.5)
Distribution: Arch Linux
Window manager: i3 (if that matters)
PDF Backend 0.6.5

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

An arbitrary highlightable pdf file was opened with okular (have tried opening from both Okular>File>Open as well as from thunar and launching from zotero) 
The F6 button was pressed to open the review tool with the highlighter option
At least two separate sections of text were highlighted with the default yellow highlighter. Doing this after highlighting only one section does not produce a crash (at least not consistently).
CTRL+Z was pressed to undo the last highlighted text
Another section of text was then highlighted
Okular immediately crashes

- Custom settings of the application:

I have added a few extra colored highlighters to the review tool, but I can make the crash occur using the default yellow highlighter only. Seems not relevant to the bug.

-- Backtrace:

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7efbf7a52800 (LWP 12111))]

Thread 9 (Thread 0x7efbdaffd700 (LWP 12123)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 8 (Thread 0x7efbdb7fe700 (LWP 12122)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 7 (Thread 0x7efbdbfff700 (LWP 12121)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 6 (Thread 0x7efbe0f53700 (LWP 12120)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7efbe1754700 (LWP 12119)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7efbe1f55700 (LWP 12118)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7efbe2897700 (LWP 12117)):
#0  0x00007efbfca8aafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007efbe77c9404 in ?? () from /usr/lib/dri/radeonsi_dri.so
#2  0x00007efbe77c90f8 in ?? () from /usr/lib/dri/radeonsi_dri.so
#3  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7efbefde4700 (LWP 12116)):
#0  0x00007efbfdb14bb1 in poll () from /usr/lib/libc.so.6
#1  0x00007efbfb67dec0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007efbfb67dfee in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007efbfe03e4a9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007efbfdfe9dac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007efbfde32f59 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007efbfe290ba6 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x00007efbfde3d005 in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007efbfca84a9d in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007efbfdb1fa43 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7efbf7a52800 (LWP 12111)):
[KCrash Handler]
#6  0x0000565557c953a0 in ?? ()
#7  0x00007efbf414a487 in PagePainter::paintCroppedPageOnPainter(QPainter*, Okular::Page const*, Okular::DocumentObserver*, int, int, int, QRect const&, Okular::NormalizedRect const&, Okular::NormalizedPoint*) () from /usr/lib/qt/plugins/okularpart.so
#8  0x00007efbf414f931 in PagePainter::paintPageOnPainter(QPainter*, Okular::Page const*, Okular::DocumentObserver*, int, int, int, QRect const&) () from /usr/lib/qt/plugins/okularpart.so
#9  0x00007efbf419b2df in ?? () from /usr/lib/qt/plugins/okularpart.so
#10 0x00007efbf419b5ee in ?? () from /usr/lib/qt/plugins/okularpart.so
#11 0x00007efbfeacd658 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007efbfea8de14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007efbfea956e1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007efbfdfeb119 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#15 0x00007efbfeac5edc in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007efbfeac67c6 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQt5Widgets.so.5
#17 0x00007efbfea9d609 in ?? () from /usr/lib/libQt5Widgets.so.5
#18 0x00007efbfea9d829 in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007efbfeab4f77 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
#20 0x00007efbfeacd799 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007efbfebd94c5 in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007efbff39973c in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#23 0x00007efbff3e3f56 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#24 0x00007efbfea8de14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#25 0x00007efbfea956e1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#26 0x00007efbfdfeb119 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#27 0x00007efbfdfee1ac in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#28 0x00007efbfe03eec4 in ?? () from /usr/lib/libQt5Core.so.5
#29 0x00007efbfb67dca7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0x00007efbfb67df59 in ?? () from /usr/lib/libglib-2.0.so.0
#31 0x00007efbfb67dfee in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0x00007efbfe03e4a9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#33 0x00007efbf7634312 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#34 0x00007efbfdfe9dac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#35 0x00007efbfdff20a6 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#36 0x000056555555e6cd in ?? ()
#37 0x00007efbfda48223 in __libc_start_main () from /usr/lib/libc.so.6
#38 0x000056555555fd9e in _start ()
Comment 1 T. Zack Crawford 2018-09-07 18:19:28 UTC
I reinstalled okular and glibc in debug mode such that I could get the full backtrace and now the bug is not reproducible...
Comment 2 T. Zack Crawford 2018-09-07 21:43:30 UTC
(In reply to T. Zack Crawford from comment #1)
> I reinstalled okular and glibc in debug mode such that I could get the full
> backtrace and now the bug is not reproducible...

The crash started happening again. Managed to extract a trace using the gnu debugger per the instructions at https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces

Trace --------
Starting program: /usr/bin/okular --verbose
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffed767700 (LWP 8371)]
[Thread 0x7ffff034b800 (LWP 8367) exited]
[Inferior 1 (process 8367) exited with code 01]
Starting program: /usr/bin/okular --verbose
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffed767700 (LWP 8374)]
[Thread 0x7ffff034b800 (LWP 8372) exited]
[Inferior 1 (process 8372) exited with code 01]
Starting program: /usr/bin/okular 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffed767700 (LWP 8387)]
[New Thread 0x7fffe6aa1700 (LWP 8390)]
[New Thread 0x7fffdb198700 (LWP 8391)]
[New Thread 0x7fffda856700 (LWP 8392)]
[New Thread 0x7fffda055700 (LWP 8393)]
[New Thread 0x7fffd9854700 (LWP 8394)]
[New Thread 0x7fffd9053700 (LWP 8395)]
[New Thread 0x7fffd8852700 (LWP 8396)]
[New Thread 0x7fffc3fff700 (LWP 8397)]
[New Thread 0x7fffc2cda700 (LWP 8400)]
[Thread 0x7fffc2cda700 (LWP 8400) exited]
[New Thread 0x7fffc2cda700 (LWP 8412)]
[New Thread 0x7fffb7fff700 (LWP 8413)]
[Thread 0x7fffc2cda700 (LWP 8412) exited]
[Thread 0x7fffb7fff700 (LWP 8413) exited]
[New Thread 0x7fffb7fff700 (LWP 8414)]
[New Thread 0x7fffc2cda700 (LWP 8415)]
[Thread 0x7fffb7fff700 (LWP 8414) exited]
[New Thread 0x7fffb7fff700 (LWP 8416)]
[Thread 0x7fffc2cda700 (LWP 8415) exited]
[New Thread 0x7fffb7fff700 (LWP 8417)]
[Thread 0x7fffb7fff700 (LWP 8416) exited]
[Thread 0x7fffb7fff700 (LWP 8417) exited]
[New Thread 0x7fffb7fff700 (LWP 8418)]
[New Thread 0x7fffc2cda700 (LWP 8419)]
[Thread 0x7fffb7fff700 (LWP 8418) exited]
[New Thread 0x7fffb7fff700 (LWP 8420)]
[Thread 0x7fffc2cda700 (LWP 8419) exited]
[New Thread 0x7fffc2cda700 (LWP 8421)]
[Thread 0x7fffb7fff700 (LWP 8420) exited]
[New Thread 0x7fffb7fff700 (LWP 8422)]
[Thread 0x7fffc2cda700 (LWP 8421) exited]
[New Thread 0x7fffc2cda700 (LWP 8423)]
[New Thread 0x7fffb77fe700 (LWP 8424)]
[Thread 0x7fffb7fff700 (LWP 8422) exited]
[Thread 0x7fffc2cda700 (LWP 8423) exited]
[New Thread 0x7fffb77fe700 (LWP 8425)]
[Thread 0x7fffb77fe700 (LWP 8424) exited]
[New Thread 0x7fffc2cda700 (LWP 8426)]
[Thread 0x7fffb77fe700 (LWP 8425) exited]
[Thread 0x7fffc2cda700 (LWP 8426) exited]
[New Thread 0x7fffc2cda700 (LWP 8427)]
[Thread 0x7fffc2cda700 (LWP 8427) exited]
[New Thread 0x7fffc2cda700 (LWP 8428)]
[Thread 0x7fffc2cda700 (LWP 8428) exited]
[New Thread 0x7fffc2cda700 (LWP 8429)]
[Thread 0x7fffc2cda700 (LWP 8429) exited]
[New Thread 0x7fffc2cda700 (LWP 8430)]
[New Thread 0x7fffb77fe700 (LWP 8431)]
[Thread 0x7fffc2cda700 (LWP 8430) exited]
[Thread 0x7fffb77fe700 (LWP 8431) exited]
[New Thread 0x7fffb77fe700 (LWP 8432)]
[Thread 0x7fffb77fe700 (LWP 8432) exited]
[New Thread 0x7fffb77fe700 (LWP 8433)]
[New Thread 0x7fffc2cda700 (LWP 8434)]
[Thread 0x7fffb77fe700 (LWP 8433) exited]
[Thread 0x7fffc2cda700 (LWP 8434) exited]
[New Thread 0x7fffc2cda700 (LWP 8435)]
[New Thread 0x7fffb77fe700 (LWP 8436)]
[New Thread 0x7fffc2cda700 (LWP 8437)]
[Thread 0x7fffc2cda700 (LWP 8435) exited]
[Thread 0x7fffb77fe700 (LWP 8436) exited]
[New Thread 0x7fffb77fe700 (LWP 8438)]
[Thread 0x7fffc2cda700 (LWP 8437) exited]
[Thread 0x7fffb77fe700 (LWP 8438) exited]
[New Thread 0x7fffb77fe700 (LWP 8439)]
[Thread 0x7fffb77fe700 (LWP 8439) exited]
[New Thread 0x7fffb77fe700 (LWP 8440)]
[Thread 0x7fffb77fe700 (LWP 8440) exited]
[New Thread 0x7fffb77fe700 (LWP 8441)]
[New Thread 0x7fffb77fe700 (LWP 8442)]
[Thread 0x7fffb77fe700 (LWP 8441) exited]
[Thread 0x7fffb77fe700 (LWP 8442) exited]
[New Thread 0x7fffb77fe700 (LWP 8443)]
[New Thread 0x7fffb77fe700 (LWP 8444)]
[Thread 0x7fffb77fe700 (LWP 8443) exited]
[Thread 0x7fffb77fe700 (LWP 8444) exited]
[New Thread 0x7fffb77fe700 (LWP 8446)]
[Thread 0x7fffb77fe700 (LWP 8446) exited]
[New Thread 0x7fffb77fe700 (LWP 8447)]

Thread 1 "okular" received signal SIGSEGV, Segmentation fault.
0x00007fffec69df6b in Okular::ObjectRect::distanceSqr (this=this@entry=0x555555c6a2a0, 
    x=x@entry=0.52796803652968038, y=y@entry=0.717892903787549, xScale=xScale@entry=1752, 
    yScale=yScale@entry=2297) at /usr/src/debug/okular-18.08.1/core/annotations.h:693
693	/usr/src/debug/okular-18.08.1/core/annotations.h: No such file or directory.
Comment 3 Albert Astals Cid 2018-09-07 22:28:31 UTC
This didn't really add much. 

I guess you may need to type backtrace after the crash to get more info.

Also if you can please run okular through valgrind, please do so and attach it?
Comment 4 Albert Astals Cid 2018-10-08 22:21:26 UTC
(In reply to Albert Astals Cid from comment #3)
> This didn't really add much. 
> 
> I guess you may need to type backtrace after the crash to get more info.

Ping ↑
Comment 5 Andrew Crouthamel 2018-10-27 04:10:59 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2018-11-12 16:05:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!