After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570667 - Evince crashes when trying to print pdf
Evince crashes when trying to print pdf
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: printing
2.24.x
Other All
: High critical
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-05 16:13 UTC by Stylianos Papanastasiou
Modified: 2018-05-22 13:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Bug trace for crash (22.56 KB, text/plain)
2009-02-06 16:27 UTC, Stylianos Papanastasiou
Details
Video of problem (834.49 KB, application/octet-stream)
2009-02-06 17:04 UTC, Stylianos Papanastasiou
Details
Video of crash with latest evince and poppler (772.45 KB, application/octet-stream)
2009-02-10 16:13 UTC, Stylianos Papanastasiou
Details
if evince is left running, even at 100% cpu usage, eventually this appears (276.85 KB, image/png)
2009-02-11 11:26 UTC, Stylianos Papanastasiou
Details
Problematic PDF page (289.94 KB, application/pdf)
2012-10-15 14:42 UTC, Stylianos Papanastasiou
Details

Description Stylianos Papanastasiou 2009-02-05 16:13:50 UTC
Steps to reproduce:
1. Download http://www.comesafety.org/fileadmin/uploads/architecture/COMeSafety_European_Communications_Architecture.pdf
2. open it in evince
3. select print from file menu


Stack trace:


Other information:
Evince crashes but does not exit. it keeps CPU at 100% trying to do something. The same document prints fine using fox reader (in wine).
Comment 1 Pedro Villavicencio 2009-02-06 16:02:00 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Stylianos Papanastasiou 2009-02-06 16:27:40 UTC
Created attachment 128096 [details]
Bug trace for crash

The application crashes as in does not produce a crash trace but keeps on showing loading in the document and the cpu spikes at 100%. If I click two or three times in the main window, then it crashes. I am including the crash trace here...
Comment 3 Stylianos Papanastasiou 2009-02-06 17:04:26 UTC
Created attachment 128100 [details]
Video of problem

This video illustrates the problem. Notice how after I choose file->print the cpu goes to 100%. Then I move the sidebar and it keeps on loading. Finally, if I click many times in the loading document view, evince crashes. Needless to say, nothing gets printed. Print to File seems to work ok though. BTW, this is all in Fedora 10 with kernel from Fedora 11. I have not tried stock F10 kernel, don't know if it matters.

Also, I noticed something else. The document is image-heavy. If I view it and start scrolling down using PgDn and I keep clicking the mouse button whilst the view scrolls, in a few seconds I get a crash (with a crash log). This doesn't happen with other documents.

Finally, note that the document in question (link in bug report) can be freely downloaded, it is intended to be read and commented upon, so you are legally allowed to download and examine it.
Comment 4 Carlos Garcia Campos 2009-02-09 17:26:32 UTC
Thanks for the so useful bug report. We have reworked the printing stuff in trunk. I think this problem is already fixed, but I'm not 100% sure. Could you upgrade evince to >= 2.25.4 and try again, please? There are several pages in the document that take a little longer to render, but it should work anyway. 
Comment 5 Stylianos Papanastasiou 2009-02-10 16:13:19 UTC
Created attachment 128388 [details]
Video of crash with latest evince and poppler

Ok I got the latest unstable evince (not svn), compiled it and the problem persists. I then tried with the latest stable poppler 0.10.3 (did't know if it would make a difference) and the problem is still there. I know now however that the printing crashes evince on page 103 (because of the indicator). In fact, in the attached video, you will see I try to print pages 101-103 and it crashes on the last page.
So I thought I might separate only those pages of interest. To do this, I decided to use print-to-file (because I knew that worked) for only those pages. And it seems the end product was a 155MB file!! I am almost certain there is something up with the picture in page 103 of the document.
Comment 6 Stylianos Papanastasiou 2009-02-11 11:26:43 UTC
Created attachment 128458 [details]
if evince is left running, even at 100% cpu usage, eventually this appears

After trying to print again, this time I let evince run even though it appeared to be stuck. Then, after 30 mins or so it came up with an empty titled dialog box which said Failed to print document  Too many failed attempts. So evince does not really crash but something fails continuously. Note how the CPU stops spiking after the 20min delay, and everything is back to normal (i.e. the evince window refreshes properly after this).
Comment 7 Kris Thomsen 2009-07-27 21:21:03 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 8 André Klapper 2009-07-28 09:40:12 UTC
Reopening as requested info had been provided.
Comment 9 Emmanuel Fleury 2009-11-04 14:41:57 UTC
Hi,

I tried to reproduce this bug and I couldn't find the original pointed document, so I took this file:
http://www.comesafety.org/uploads/media/COMeSafety_DEL_D31_EuropeanITSCommunicationArchitecture_v2.0_01.pdf

I can't crash Evince with this one. But, anyway, I noticed a very strange behavior on page 103 which produce a lot of warnings and slow the printing process. It is very likely due to the figure on the top of the page.

Could these crashes (or denial of service) be produced by a timeout which had been set too low when the PDF to PS translation hit some complex translation work ?
Comment 10 Philip Ganchev 2011-04-13 20:31:17 UTC
With the document from the previous comment, I also get a lot of CPU use and an error dialog box saying that my root partition is out of space, then a Print error dialog box saying "there was a problem processing document" and the page is not printed. I guess everything would be fine if there was enough disk space.
Comment 11 Xavier Claessens 2012-10-15 12:23:08 UTC
Tried to print the pdf into a PS file (I don't have any printer connected atm) and it worked perfectly (evince 3.6.0 here). Maybe this bug is already fixed, or do I need a real printer connected?
Comment 12 Stylianos Papanastasiou 2012-10-15 14:42:52 UTC
Created attachment 226471 [details]
Problematic PDF page

PDF page from a file which used to choke (freeze) evince in the past when printing. Still today if you try to print it, it results in a massive 180MB file sent to the printer! This page is 269kb on disk. If you print it, you get 163MB file(!)
Comment 13 Stylianos Papanastasiou 2012-10-15 14:45:16 UTC
I extracted the page from the document in the original bug report document which can now be found at http://www.esafetysupport.org/download/eSafety_Studies/COMeSafety_Architecture_Documents/COMeSafety_European_Communications_Architecture.pdf

The bug report is still valid today - I narrowed down the problem to this page (103) which I extracted from the original pdf using PDF Mod v0.9.1

I think if someone looks into this small 243kb file they will easily realise what is wrong and maybe fix it :)
Comment 14 Xavier Claessens 2012-10-15 15:03:31 UTC
ok, indeed generated .ps file is huge. Did not notice probably because I've got SSD and i7 CPU here so it wasn't that slow to generate.
Comment 15 James Cloos 2012-10-16 13:01:27 UTC
Nearly every string in that file is set (o)(n)(e) (g)(l)(y)(p)(h) (a)(t) (a) (t)(i)(m)(e).  There are also a tremendous quantity of small inline images.
(The one-page attachment has nearly 80000.)  The only reason the original pdf has a reasonably size is that the majority of each page is deflated.

The conversion from pdf syntax to ps syntax explodes the filesize.  Even just decompressing the pdf’s streams (I used mupdfclean -d) generates a *much* larger pdf.

Were poppler to use eg ashow or kshow or the like it could compress the generated ps by outputting fewer, longer strings with their respective kernings.  Whether ps interpreters would slow down more from the added complexity than they do from the longer, status quo bit stream is unknown.

OTOH, coalessing the small images into fewer, larger images ought to be generally beneficial.
Comment 16 Germán Poo-Caamaño 2013-11-02 00:49:15 UTC
Can anybody reproduce the issue with a newer evince/poppler?

With evince/poppler master, the PS is 27MB.

I see performance issues in rendering, though. It takes ~5-6 seconds in
Evince, whereas in poppler-glib-demo it renders the page in 2.266 seconds.
The selection in Evince takes more or less the same time to show it, in
poppler-glib-demo it is immediate.
Comment 17 Geri Vahey 2016-11-18 04:04:11 UTC
This is likely a problematic document. It is still not printing with evince 3.20, but it's no longer crashing. 
Perhaps this should be moved to Poppler.
Comment 18 GNOME Infrastructure Team 2018-05-22 13:28:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/78.