Bug 439566 - Printing special sample file or generating a printer preview for it freezes UI
Summary: Printing special sample file or generating a printer preview for it freezes UI
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 16:37 UTC by postix
Modified: 2021-07-07 23:06 UTC (History)
2 users (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 postix 2021-07-06 16:37:32 UTC
STEPS TO REPRODUCE
1. Open https://bugs.kde.org/attachment.cgi?id=139894 in Okular
2. File -> Printer Preview

OBSERVED RESULT

Okular uses 100% of one core for several seconds and the UI freezes. Finally it says ghostscript is missing in order to display the preview.


EXPECTED RESULT

Okular directly says that ghostscript is missing; if it's installed it wouldn't freeze the UI.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210704
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.12.13-1-default (64-bit)
Comment 1 postix 2021-07-06 16:46:13 UTC
The UI freezes as well for printing the given sample file above.
Comment 2 Albert Astals Cid 2021-07-06 22:41:03 UTC
opensuse packaging has decided they don't want you to have this working.

Go and complain to them.
Comment 3 postix 2021-07-07 10:08:40 UTC
(In reply to Albert Astals Cid from comment #2)
> opensuse packaging has decided they don't want you to have this working.
> 
> Go and complain to them.

This bug is _not_ about ghostscript missing, this bug is about two things:

1) the high CPU usage and the blocking of the main thread
2) if ghostscript isn't installed at all it doesn't make sense to use resource to generate a preview which cannot be displayed anyway. So it'd make sense to check it first.
Comment 4 postix 2021-07-07 10:10:47 UTC
Please see https://bugs.kde.org/show_bug.cgi?id=439566#c1
Comment 5 postix 2021-07-07 10:11:21 UTC
Let's make this bug report only about the freezing UI then. I may create another one for the order of processing the preview. OK?
Comment 6 Albert Astals Cid 2021-07-07 23:06:10 UTC
Please open two new bugs, this is already dirty with being about two things with comments about both and whatnot.

It'll be easier to track for future people that have time to have a look at the bugs if they are two separate and well defined issues.