Bug 498729 - Okular hangs / freezes (infinite loop?) when changing PDF dropdown form input
Summary: Okular hangs / freezes (infinite loop?) when changing PDF dropdown form input
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 24.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-16 10:26 UTC by dorla.hutch
Modified: 2025-01-20 15:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
I tried to remove meta data and identifying information from the PDF. (444.64 KB, application/pdf)
2025-01-16 10:26 UTC, dorla.hutch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dorla.hutch 2025-01-16 10:26:57 UTC
Created attachment 177398 [details]
I tried to remove meta data and identifying information from the PDF.

SUMMARY

I have a personal information form (PDF) where interacting with one specific dropdown form input freezes Okular at 24% CPU usage (fortunately only that) without any further reaction.

STEPS TO REPRODUCE
1. open the attached PDF page
2. enable Form interaction (top right corner)
3. choose a new value for the first dropdown (combo) box "Beschäftigt als:"

OBSERVED RESULT

It will not change the value. Instead, it hangs indefinitely.

EXPECTED RESULT

Changes the value to the chosen value but at least remains serviceable without restarting the process.

SOFTWARE/OS VERSIONS
Windows: 11
Linux/KDE Plasma: 6.12.9
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION

Bug does not appear in Firefox but also happens on Windows with Okular.
Comment 1 Albert Astals Cid 2025-01-18 22:29:00 UTC
It's not hung, it's just looping for very long time, if you give it enough time it will finish, but yeah needs fixing, basically the thing is that that option form has 30 thousand entries and we had never tested with some many and the code is awfully inefficient when that happens.
Comment 2 Bug Janitor Service 2025-01-18 22:30:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/1117
Comment 3 Albert Astals Cid 2025-01-20 12:28:51 UTC
Git commit 0ffceee4350a83a6190b14a2a605c0b9e6cff485 by Albert Astals Cid.
Committed on 20/01/2025 at 12:21.
Pushed by aacid into branch 'master'.

Fix apparent hang in files with lots of entries in a choice field

M  +4    -1    generators/poppler/formfields.cpp
M  +2    -0    generators/poppler/formfields.h

https://invent.kde.org/graphics/okular/-/commit/0ffceee4350a83a6190b14a2a605c0b9e6cff485
Comment 4 Albert Astals Cid 2025-01-20 15:56:08 UTC
Git commit d67b3ff1227d85acea53f6990482e031062d8177 by Albert Astals Cid.
Committed on 20/01/2025 at 15:55.
Pushed by aacid into branch 'release/24.12'.

Fix apparent hang in files with lots of entries in a choice field
(cherry picked from commit 0ffceee4350a83a6190b14a2a605c0b9e6cff485)

M  +4    -1    generators/poppler/formfields.cpp
M  +2    -0    generators/poppler/formfields.h

https://invent.kde.org/graphics/okular/-/commit/d67b3ff1227d85acea53f6990482e031062d8177