Created attachment 164978 [details] crash caught in gdb SUMMARY Saving a Form 4 (Queensland) document with two particular checkboxes checked will result in a crash. This only seems to happen with this document and with these checkboxes. STEPS TO REPRODUCE 1. Download https://www.publications.qld.gov.au/ckan-publications-attachments-prod/resources/56b091a2-4c65-48a0-99e1-01661c4d9e77/form-4-advance-health-directive-queensland.pdf?ETag=2d1d93c9b87bdc6db996ddb5107cdc71 2. Open with Okular 3. Scroll down to section 4 4. Check Option 3 ("I cannot decide at this point") and Option 4 ("I give the following specific directions") 5. Save OBSERVED RESULT Program Crashes EXPECTED RESULT File saves SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Arch Linux with kde-unstable repo (available in About System) KDE Plasma Version: 5.92.0 KDE Frameworks Version: 5.248.0 Qt Version: 6.7.0 Graphics Platform: Wayland ADDITIONAL INFORMATION Sometimes it will popup a messagebox saying it cannot open the file, but the application will freeze.
Also reproducible in 22.12.
So. I guess I need to discuss this with Albert and maybe read the pdf standard. The following becomes a bit technical: But apparantly the 4 options is in a 'button group' and okular assumes that all buttons on a button group is in the same page. But 4 is on a page of itself. And Okular gets confused by this (and EditFormButtonsCommand::refreshInternalPageReferences fails (It looks for the form elements on the wrong page) to succeed) and after that, okular seems to be in a bad state and starts crashing.
not qt6 specific, bug janitor.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/915
Git commit 12e40e0d360f9912eee1b162d61e3f183676ea5a by Albert Astals Cid, on behalf of Sune Vuorela. Committed on 25/01/2024 at 23:14. Pushed by aacid into branch 'master'. Button groups can span multiple pages The code needs to be aware of that. M +17 -2 core/documentcommands.cpp M +1 -0 core/documentcommands_p.h M +13 -2 part/formwidgets.cpp https://invent.kde.org/graphics/okular/-/commit/12e40e0d360f9912eee1b162d61e3f183676ea5a
Git commit f0e98bd5315232f7dc86edc1002d7fdf22181413 by Albert Astals Cid, on behalf of Sune Vuorela. Committed on 25/01/2024 at 23:17. Pushed by aacid into branch 'release/24.02'. Button groups can span multiple pages The code needs to be aware of that. (cherry picked from commit 12e40e0d360f9912eee1b162d61e3f183676ea5a) M +17 -2 core/documentcommands.cpp M +1 -0 core/documentcommands_p.h M +13 -2 part/formwidgets.cpp https://invent.kde.org/graphics/okular/-/commit/f0e98bd5315232f7dc86edc1002d7fdf22181413