Bug 474429

Summary: Okular crashing when saving a PDF with highlighting
Product: [Applications] okular Reporter: Queue <qmm>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED DUPLICATE    
Severity: crash CC: agustingifi, whyhow+tech
Priority: NOR Keywords: drkonqi
Version: 23.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Queue 2023-09-11 23:14:44 UTC
Application: okular (23.08.0)

Qt Version: 5.15.10
Frameworks Version: 5.110.0
Operating System: Linux 6.5.2-zen1-1-zen x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 5.27.7 [KCrashBackend]

-- Information about the crash:
Saving a PDF with Highlighted text causes the program to crash, not saving what you highlighted. I think it's worth meantioning that attempting to highlight it for the first time, the selected area does not get marked. Doing it a second time, the text is now highlighted. This might be related.

The crash can be reproduced every time.

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

[KCrash Handler]
#4  0x00007fa2516c5154 in KMountPoint::mountType() const () at /usr/lib/libKF5KIOCore.so.5
#5  0x00007fa207e8787d in  () at /usr/lib/qt/plugins/kf5/kio/kio_file.so
#6  0x00007fa2516728db in KIO::SlaveBase::dispatch(int, QByteArray const&) () at /usr/lib/libKF5KIOCore.so.5
#7  0x00007fa25166b20e in KIO::SlaveBase::dispatchLoop() () at /usr/lib/libKF5KIOCore.so.5
#8  0x00007fa2516ebe87 in  () at /usr/lib/libKF5KIOCore.so.5
#9  0x00007fa24fcf35da in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#11 0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7fa22b7fe6c0 (LWP 9031) "okular"):
#1  0x00007fa24d9706f9 in  () at /usr/lib/libusbmuxd-2.0.so.6
#2  0x00007fa24d9713cc in  () at /usr/lib/libusbmuxd-2.0.so.6
#3  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#4  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7fa22bfff6c0 (LWP 9026) "okular:sh2"):
#1  0x00007fa24f48bd40 in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fa239ec794c in  () at /usr/lib/dri/iris_dri.so
#3  0x00007fa239f1485c in  () at /usr/lib/dri/iris_dri.so
#4  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#5  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7fa2309fd6c0 (LWP 9025) "okular:sh1"):
#1  0x00007fa24f48bd40 in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fa239ec794c in  () at /usr/lib/dri/iris_dri.so
#3  0x00007fa239f1485c in  () at /usr/lib/dri/iris_dri.so
#4  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#5  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7fa2311fe6c0 (LWP 9024) "okular:sh0"):
#1  0x00007fa24f48bd40 in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fa239ec794c in  () at /usr/lib/dri/iris_dri.so
#3  0x00007fa239f1485c in  () at /usr/lib/dri/iris_dri.so
#4  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#5  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7fa2319ff6c0 (LWP 9023) "okular:disk$0"):
#1  0x00007fa24f48bd40 in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fa239ec794c in  () at /usr/lib/dri/iris_dri.so
#3  0x00007fa239f1485c in  () at /usr/lib/dri/iris_dri.so
#4  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#5  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7fa24912e6c0 (LWP 9022) "WaylandEventThr"):
#1  0x00007fa24dd22d9d in  () at /usr/lib/libQt5WaylandClient.so.5
#2  0x00007fa24fcf35da in  () at /usr/lib/libQt5Core.so.5
#3  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#4  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fa24992f6c0 (LWP 9021) "WaylandEventThr"):
#1  0x00007fa24f48bd40 in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fa24fcfb364 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt5Core.so.5
#3  0x00007fa24dd22d44 in  () at /usr/lib/libQt5WaylandClient.so.5
#4  0x00007fa24fcf35da in  () at /usr/lib/libQt5Core.so.5
#5  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#6  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fa24adff6c0 (LWP 9020) "QDBusConnection"):
#1  0x00007fa24e56c206 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fa24e50c112 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fa24feeb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007fa24fe9b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007fa24fcf73b6 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007fa251156a9a in  () at /usr/lib/libQt5DBus.so.5
#7  0x00007fa24fcf35da in  () at /usr/lib/libQt5Core.so.5
#8  0x00007fa24f48c9eb in  () at /usr/lib/libc.so.6
#9  0x00007fa24f510dfc in  () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7fa24b2c2280 (LWP 9019) "okular"):
#1  0x00007fa24e56c206 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fa24e50c112 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fa24feeb53f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007fa24fe9b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007fa25122420e in KJob::exec() () at /usr/lib/libKF5CoreAddons.so.5
#6  0x00007fa2480f6703 in Okular::Part::saveAs(QUrl const&, QFlags<Okular::Part::SaveAsFlag>) () at /usr/lib/qt/plugins/okularpart.so
#7  0x00007fa2480f7d85 in Okular::Part::saveFile() () at /usr/lib/qt/plugins/okularpart.so
#8  0x00007fa24fed1637 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007fa250b6bbb7 in QAction::triggered(bool) () at /usr/lib/libQt5Widgets.so.5
#10 0x00007fa250b7160b in QAction::activate(QAction::ActionEvent) () at /usr/lib/libQt5Widgets.so.5
#11 0x00007fa250cf400b in  () at /usr/lib/libQt5Widgets.so.5
#12 0x00007fa250cf412d in  () at /usr/lib/libQt5Widgets.so.5
#13 0x00007fa250baf1e1 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007fa250b7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007fa250b7ddef in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x00007fa24fe9c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#17 0x00007fa250b7c12a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007fa250bcd9d4 in  () at /usr/lib/libQt5Widgets.so.5
#19 0x00007fa250bcec27 in  () at /usr/lib/libQt5Widgets.so.5
#20 0x00007fa250b7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#21 0x00007fa24fe9c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#22 0x00007fa25034193c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#23 0x00007fa25032a6c5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#24 0x00007fa24dd5ec25 in  () at /usr/lib/libQt5WaylandClient.so.5
#25 0x00007fa24e50df19 in  () at /usr/lib/libglib-2.0.so.0
#26 0x00007fa24e56c2b7 in  () at /usr/lib/libglib-2.0.so.0
#27 0x00007fa24e50c112 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#28 0x00007fa24feeb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#29 0x00007fa24fe9b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#30 0x00007fa24fe9c8a3 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#31 0x00005558cb2ec4ca in  ()
#32 0x00007fa24f427cd0 in  () at /usr/lib/libc.so.6
#33 0x00007fa24f427d8a in __libc_start_main () at /usr/lib/libc.so.6
#34 0x00005558cb2ed345 in  ()
[Inferior 1 (process 9019) detached]

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

Reported using DrKonqi
Comment 1 Antonio Rojas 2023-09-12 18:22:31 UTC

*** This bug has been marked as a duplicate of bug 474451 ***
Comment 2 agustingifi 2023-11-06 05:25:24 UTC
Created attachment 162891 [details]
New crash information added by DrKonqi

okular (23.08.1) using Qt 5.15.10

When highlighting text and saving (ovewriting a file), sometimes Okular will crash.

The text I was reading is a long PDF file, over 1000 Pages and many highlights were done, so there might be a Segmentation Fault happening somewhere.

-- Backtrace (Reduced):
#4  0x00007fbe35d4f78a in Okular::Document::addPageAnnotation(int, Okular::Annotation*) () from /lib/x86_64-linux-gnu/libOkular5Core.so.11
[...]
#7  0x00007fbe44da4e18 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007fbe44e4fc8e in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007fbe440c2e5b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fbe44d62d1e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5