Bug 294514 - Okular stalls with 100% CPU when trying to print/preview a document with filled forms
Summary: Okular stalls with 100% CPU when trying to print/preview a document with fill...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-20 18:12 UTC by Dario Freddi
Modified: 2012-02-20 18:57 UTC (History)
0 users

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 Dario Freddi 2012-02-20 18:12:37 UTC
Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

This bug can be easily reproduced by filling the new eV expense form. When trying to print or preview print, Okular goes 100% CPU and stalls forever. Looking at the backtraces, it seems to be related to some issues with poppler and fonts. This is one of the most easy to find:

#0  0x00007ffff516d6ea in _IO_fread (buf=<optimized out>, size=1, count=<optimized out>, fp=<optimized out>) at iofread.c:47
#1  0x00007fffe38b26af in FileStream::fillBuf() () from /usr/lib/libpoppler.so.13
#2  0x00007fffe38b6d0d in FileStream::getChar() () from /usr/lib/libpoppler.so.13
#3  0x00007fffe38b51a3 in FlateStream::readSome() () from /usr/lib/libpoppler.so.13
#4  0x00007fffe38b553a in FlateStream::getChars(int, unsigned char*) () from /usr/lib/libpoppler.so.13
#5  0x00007fffe387ac87 in GfxFont::readEmbFontFile(XRef*, int*) () from /usr/lib/libpoppler.so.13
#6  0x00007fffe387be2f in Gfx8BitFont::Gfx8BitFont(XRef*, char*, Ref, GooString*, GfxFontType, Dict*) () from /usr/lib/libpoppler.so.13
#7  0x00007fffe387e1fc in GfxFont::makeFont(XRef*, char*, Ref, Dict*) () from /usr/lib/libpoppler.so.13
#8  0x00007fffe387e48f in GfxFontDict::GfxFontDict(XRef*, Ref*, Dict*) () from /usr/lib/libpoppler.so.13
#9  0x00007fffe38ca4ce in PSOutputDev::setupFonts(Dict*) () from /usr/lib/libpoppler.so.13
#10 0x00007fffe38ca569 in PSOutputDev::setupResources(Dict*) () from /usr/lib/libpoppler.so.13

Although, all of them seem to originate from "Gfx8BitFont::Gfx8BitFont(XRef*, char*, Ref, GooString*, GfxFontType, Dict*) () from /usr/lib/libpoppler.so.13"

Reproducible: Didn't try

Steps to Reproduce:
Download http://ev.kde.org/resources/expense-iban.pdf , fill some forms, try to print it or to preview print.

Actual Results:  
Okular stalls at 100% CPU

Expected Results:  
Prints successfully
Comment 1 Albert Astals Cid 2012-02-20 18:57:25 UTC
Update to poppler 0.18 it is much faster 43 seconds of process running time from startup to print preview versus 11 minutes in poppler 0.16 and it has still not finished.

If you think 43 seconds is still too much please report a bug against poppler mentioning the issue and let's see if it can be profiled and made faster.