Bug 107793 - huge memory usage while opening a specific PDF file
Summary: huge memory usage while opening a specific PDF file
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.4.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-20 17:10 UTC by Sven-Erik Petermann
Modified: 2015-02-07 16:17 UTC (History)
2 users (show)

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


Attachments
Opening this PDF results in memory hogging. (429.98 KB, application/pdf)
2005-06-20 17:13 UTC, Sven-Erik Petermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Erik Petermann 2005-06-20 17:10:32 UTC
Version:           0.4.1 (using KDE 3.4.1-1.0.fc3.kde, Fedora)
Compiler:          gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
OS:                Linux (i686) release 2.6.11-1.27_FC3

Opening this PDF file:
http://citeseer.ist.psu.edu/rd/87762860%2C150189%2C1%2C0.25%2CDownload/http://citeseer.ist.psu.edu/cache/papers/cs/370/ftp:zSzzSzftp.ifi.unizh.chzSzpubzSzinstitutezSzailabzSztechreportszSz96.10.pdf/sensory-motor-coordination-the.pdf
and viewing its 6th page (a picture of some kind) results in KPDF using more and more of memory. This can be seen from swap usage - in just a few seconds it grows from using 0 MB of swap to using 500 MB of swap.
Comment 1 Sven-Erik Petermann 2005-06-20 17:13:51 UTC
Created attachment 11528 [details]
Opening this PDF results in memory hogging.
Comment 2 Albert Astals Cid 2005-06-21 18:17:19 UTC
Well, the problem is that the document itself is faulty, on Page 6 there's a text that wants to be drawn in a HUGE font size, that causes the need for lots of memory to freetype to "draw" the font and results in that swap usage (or OOM killer launching in my case). Acrobat Reader does not suffers from this memory hogging because i suppose it realizes the font can not be that big and simply skips drawing it.
I'll try to find a way to fix that.
Comment 3 Andrej 2005-10-13 21:40:23 UTC
The same problem here! It crashed the whole system. I'm not used to pulling the plug out with Linux, but this time I had to do so. The memory leakage was such that the system stopped responding completely. This bug has been mentioned multiple times and is said to be RESOLVED in most cases. Well, it obviously persists. I installed kpdf from an up-to-date Arch Linux package.
Comment 4 Albert Astals Cid 2005-10-13 21:58:34 UTC
You see it marked as RESOLVED? You should look more carefully. Please don't act as if it was so easy to fix, if you think it is you can always send a patch.
Comment 5 Julian Drube 2006-02-07 19:24:37 UTC
i have the same problem with this pdf : http://artus.et7.tu-harburg.de/~et7www/phpsite/lehre/pdf_dateien/physik_aiw_iiw/aufgaben/Blatt05.pdf

kpdf eats up all system memory and doesn't respond anymore. the pdf works fine in acroread though.
there are no graphics on this page just simple text.

it's really annoying because the whole system becomes unusable. i am using the latest kpdf version 0.5.1 installed through gentoo portage.
Comment 6 Albert Astals Cid 2006-02-07 19:38:47 UTC
blame gentoo packagers or your over optimizations then, here it opens in less than 1 sec here.
Comment 7 Julian Drube 2006-02-07 19:50:16 UTC
i haven't used any special optimizations. must be the gentoo packages then.
will downgrade to 0.5 and see what happens.
Comment 8 Sven-Erik Petermann 2006-02-07 22:08:08 UTC
Works fine for me. Why do you say there are no graphics there? I'm wondering if this is the correct pdf. Anyway, I'm using 0.5.1 (kdegraphics-3.5.1-1.3.fc4.kde) from kde-redhat.sf.net.
Comment 9 Julian Drube 2006-02-08 00:07:00 UTC
got the solution to the problem. it wasn't kpdf but libpoppler. i recompiled 
poppler without zlib support and now it works.

maybe someone else can reproduce this by compiling zlib support into poppler.

thanks for the fast replies. KPDF rocks :-)
Comment 10 Maciej Grela 2006-04-25 10:54:52 UTC
Same thing happens with hit PDF: http://www.cyfronika.com.pl/kitynepdf/186K.pdf
Comment 11 Chris Kerr 2006-08-10 18:49:32 UTC
Same here with this pdf http://books.nips.cc/papers/files/nips18/NIPS2005_0176.pdf

(KPDF 0.5.2 on KDE 3.5.2, Gentoo Linux)
Comment 12 Thomas Bettler 2006-09-10 19:27:11 UTC
I confirm this issue. Opening any of theese pdfs, scrolling up and down 20 times and my memory and swap is crowded to burst. no single bit left free.
interestingly the memory usage settings have no impact on the result, my 0.5GB RAM and 2GB of swap will be full either way. (and no, neither "watch file" helps)

using KPDF 0.5.4 on Gentoo 2006.1 on kernel 2.6.17.12
Comment 13 Thomas Bettler 2006-09-10 20:17:32 UTC
Hm, I recompiled poppler and poppler-bindings-0.5.3 (don't contain zlib) but the problem persists. Any clue, what I could try else now?
Comment 14 JPH 2006-11-17 18:19:39 UTC
same problem here with this link: http://facweb.cti.depaul.edu/jyu/Publications/Yu-Linux-TSM2004.pdf
Once I start browsing the document, within 2 or 3 minutes 1GB of swap space fills up, and the application crashes.

kpdf  : 0.5.4
kde   : 3.5.2
kernel: 2.6.17-gentoo-r8
Comment 15 Albert Astals Cid 2006-11-17 19:17:36 UTC
@JPH can not reproduce
Comment 16 Pino Toscano 2006-11-27 14:45:27 UTC
At all the commenters of this bug using gentoo: please recompile your KPDF *without* the poppler patch. KPDF of KDE 3.x does not use poppler at all.
Comment 17 Matija Šuklje 2007-05-09 15:24:52 UTC
According to https://bugs.gentoo.org/show_bug.cgi?id=164248 the problem in Gentoo is not poppler, but the freetype lib. Freetype 2.3.4 (as of today, marked as stable) should work.

I filed a bug (although got a bit scolded for not tagging it properly ...sorry) to the Gentoo bugzilla for the removal of the poppler dependancies in the kdpf ebuilds - https://bugs.gentoo.org/show_bug.cgi?id=177473
Comment 18 Olivier Vitrat 2007-05-11 19:44:12 UTC
See also this Debian bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=421306
with an example
Comment 19 Albert Astals Cid 2015-02-07 16:17:22 UTC
Thank you for your bug report or feature suggestion.

The "KPDF" application is no longer maintained, and all tickets are now closed.

We recommend to switch to the "Okular" application.

Due to the high number of bugs/suggestions in "KPDF" we are not able to go through all of them and verify if they are still valid in "Okular".

That's why are we asking you to help us by checking if your bug/suggestion is still valid in Okular and if it still is opening a new bug/suggestion against it.

Thank you for your effort in making KPDF better :)

(This is an automatic message from the KDE bug triaging team)