Bug 379749 - Crash when saving/closing a PDF with forms
Summary: Crash when saving/closing a PDF with forms
Status: RESOLVED DUPLICATE of bug 393334
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.1.0
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-12 12:24 UTC by Gery
Modified: 2018-06-04 23:10 UTC (History)
4 users (show)

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


Attachments
Backtrace (4.67 KB, text/plain)
2017-05-12 12:24 UTC, Gery
Details
valgrind output (2 bytes, text/plain)
2017-05-12 12:57 UTC, Gery
Details
valgrind output (34.95 KB, text/plain)
2017-05-12 12:59 UTC, Gery
Details
Backtrace with debug symbols (10.01 KB, text/plain)
2017-05-12 13:48 UTC, Oliver Sander
Details
PDF file that causes the crash (5.38 KB, application/pdf)
2017-05-16 20:01 UTC, Gery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gery 2017-05-12 12:24:33 UTC
Created attachment 105475 [details]
Backtrace

As the title says Okular crashes when saving a PDF with forms. It only happens after changing the text of a multiline form field.

Steps to reproduce:
1. Open PDF which contains multiline form fields
2. Change the text in one of them
3. Close/save the file

Okular still successfully saves the changes, but crashes afterwards.

Also, when the textfield is not in focus and you enter text the scrolling is quite jerky (input elements stay at their old place until the scrolling is done and you stop entering text for about 1-2 seconds). And the radio buttons have some text behind them when the forms are shown.

I cannot upload the file here, but if you need it I can send it to you by mail.
Comment 1 Oliver Sander 2017-05-12 12:28:51 UTC
The backtrace is not very helpful.  Can you install debug symbols and then post a new backtrace?  Or you can send me the file.  If I can reproduce the problem on the current git master I can also post the proper backtrace.
Comment 2 Gery 2017-05-12 12:57:13 UTC
Created attachment 105476 [details]
valgrind output

I've installed the debug symbols for Okular and Poppler but now I don't get a backtrace anymore. However, I can have attached a the output of valgrind, which shows where poppler accesses invalid memory.
I also sent you the file.
Comment 3 Gery 2017-05-12 12:59:49 UTC
Created attachment 105477 [details]
valgrind output

Fix upload
Comment 4 Oliver Sander 2017-05-12 13:48:31 UTC
Created attachment 105480 [details]
Backtrace with debug symbols
Comment 5 Oliver Sander 2017-05-12 13:49:12 UTC
Reproduced on Debian testing with poppler 0.48 and okular git master.
Comment 6 Gery 2017-05-16 20:01:32 UTC
Created attachment 105598 [details]
PDF file that causes the crash

Here's a sample file which I can add thanks to Oliver Sander.
Comment 7 Andrew Chen 2017-09-16 09:25:42 UTC
Looks like a qt bug to me. The destructor of QSyntaxHighlighter should not emit a QTextEdit::textChanged signal.
Comment 8 Nate Graham 2017-09-19 04:10:21 UTC
Can you find or file a Qt bug for that?
Comment 9 Albert Astals Cid 2017-09-19 07:23:50 UTC
Honestly, i'm pretty sure we can fix ourselves without being lazy and saying "this is something Qt should fix"
Comment 10 Albert Astals Cid 2018-06-04 23:10:28 UTC

*** This bug has been marked as a duplicate of bug 393334 ***