Bug 467775 - Okular crashes when clicking in PDF form editable multi-line text field
Summary: Okular crashes when clicking in PDF form editable multi-line text field
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 22.12.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-03-25 13:08 UTC by Ryan Thompson
Modified: 2023-04-12 14:40 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 Ryan Thompson 2023-03-25 13:08:57 UTC
Application: okular (22.12.2)

Qt Version: 5.15.8
Frameworks Version: 5.103.0
Operating System: Linux 6.1.19-1-MANJARO x86_64
Windowing System: X11
Distribution: Manjaro Linux
DrKonqi: 5.26.5 [KCrashBackend]

-- Information about the crash:
When opening a some PDFs with fillable fields. Clicking in a multi-line text box immediately crashes Okular, before I can even start typing in the field. Worth noting, the PDF in question already has text in those fields, and the backtrace seems font-related, so my expectation is that one of the characters already present in the filled form is causing issues with the font Okular is using to render the form text.

The crash can be reproduced every time.

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

[KCrash Handler]
#4  0x00007ff36995a750 in GfxResources::doLookupFont(char const*) const () at /usr/lib/libpoppler.so.126
#5  0x00007ff36995a822 in GfxResources::lookupFont(char const*) () at /usr/lib/libpoppler.so.126
#6  0x00007ff369955b8e in Form::ensureFontsForAllCharacters(GooString const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, GfxResources*) () at /usr/lib/libpoppler.so.126
#7  0x00007ff36994a82b in  () at /usr/lib/libpoppler.so.126
#8  0x00007ff37042457d in Poppler::FormFieldText::setText(QString const&) () at /usr/lib/libpoppler-qt5.so.1
#9  0x00007ff3953c4b3d in  () at /usr/lib/libOkular5Core.so.10
#10 0x00007ff3a2f0357a in QUndoStack::push(QUndoCommand*) () at /usr/lib/libQt5Widgets.so.5
#11 0x00007ff3955816ba in  () at /usr/lib/qt/plugins/okularpart.so
#12 0x00007ff3a1ebea71 in  () at /usr/lib/libQt5Core.so.5
#13 0x00007ff3955869aa in  () at /usr/lib/qt/plugins/okularpart.so
#14 0x00007ff3a1ebea71 in  () at /usr/lib/libQt5Core.so.5
#15 0x00007ff3a1ebec20 in  () at /usr/lib/libQt5Core.so.5
#16 0x00007ff3a2d57d0d in  () at /usr/lib/libQt5Widgets.so.5
#17 0x00007ff3a2d38956 in QTextEdit::setPlainText(QString const&) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007ff395588718 in  () at /usr/lib/qt/plugins/okularpart.so
#19 0x00007ff3a2b78b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#20 0x00007ff3a1e8df48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#21 0x00007ff3a2b74bec in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) () at /usr/lib/libQt5Widgets.so.5
#22 0x00007ff3a2ba97f7 in QWidget::setFocus(Qt::FocusReason) () at /usr/lib/libQt5Widgets.so.5
#23 0x00007ff3a2b78efb in QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget*, QEvent*, QPoint) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ff3a2b7f016 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ff3a1e8df48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#26 0x00007ff3a2b7c377 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib/libQt5Widgets.so.5
#27 0x00007ff3a2bcd505 in  () at /usr/lib/libQt5Widgets.so.5
#28 0x00007ff3a2bcf2ae in  () at /usr/lib/libQt5Widgets.so.5
#29 0x00007ff3a2b78b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#30 0x00007ff3a1e8df48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#31 0x00007ff3a233efbc in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#32 0x00007ff3a2328885 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#33 0x00007ff39cf2e8d0 in  () at /usr/lib/libQt5XcbQpa.so.5
#34 0x00007ff3a091682b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#35 0x00007ff3a096dcc9 in  () at /usr/lib/libglib-2.0.so.0
#36 0x00007ff3a09150e2 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#37 0x00007ff3a1ed8c6c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#38 0x00007ff3a1e866ec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#39 0x00007ff3a1e91219 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#40 0x000055637e34a882 in  ()
#41 0x00007ff3a163c790 in __libc_start_call_main (main=main@entry=0x55637e349080, argc=argc@entry=2, argv=argv@entry=0x7ffcdc576ae8) at ../sysdeps/nptl/libc_start_call_main.h:58
#42 0x00007ff3a163c84a in __libc_start_main_impl (main=0x55637e349080, argc=2, argv=0x7ffcdc576ae8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcdc576ad8) at ../csu/libc-start.c:360
#43 0x000055637e34b445 in  ()
[Inferior 1 (process 4088560) detached]

The reporter indicates this bug may be a duplicate of or related to bug 460759, bug 456716, bug 462312.

Reported using DrKonqi
Comment 1 Albert Astals Cid 2023-03-28 13:27:03 UTC
We're going to need the file
Comment 2 Ryan Thompson 2023-03-28 14:59:31 UTC
(In reply to Albert Astals Cid from comment #1)
> We're going to need the file

Unfortunately the specific file is confidential. However, I suspect that there is a specific character in that fillable field causing the crash, so I will see if I can reduce it to just that character and delete the rest of the filled contents, which would result in a file I can share.
Comment 3 Bug Janitor Service 2023-04-12 03:45:52 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
mark the bug 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 4 Ryan Thompson 2023-04-12 14:02:13 UTC
Oddly, I can no longer reproduce the issue on the file in question. In the intervening days, my system has been upgraded and I now have Okular version 22.12.3 (whereas at the time of reporting I had 22.12.2. I suppose it's possible that some change in this new version fixed the bug, or possibly the bug was in some other library that got updated as well.