GNOME Bugzilla – Bug 710957
evince cannot render some EPS files
Last modified: 2015-10-16 18:52:02 UTC
Originally reported at: https://bugs.launchpad.net/bugs/1242678 I upgraded to Ubuntu Saucy, evince cannot render EPS files generated by gnuplot. (Just show an empty page.) [how to reproduce] 1. Generate an EPS file using gnuplot by executing the following command. $ gnuplot -e "set terminal postscript; set output 'test.eps'; plot x;" 2. Open the file "test.eps" just created. $ evince "test.eps" The following are what evince writes to the terminal. (evince:24176): EvinceDocument-CRITICAL **: ev_document_get_n_pages: assertion 'EV_IS_DOCUMENT (document)' failed (evince:24176): Gtk-WARNING **: drawing failure for widget `EvView': invalid matrix (not invertible) (evince:24176): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed (evince:24176): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed 3. Then evince just shows an empty (white) page. === If i rotate 90 or -90 degree by pressing Ctrl+Left or Ctrl+Right key, evince can show this file correctly. === Okular, GIMP, inkscape and gs can show this EPS file. (may be rotated 90 degree, however) ProblemType: Bug DistroRelease: Ubuntu 13.10 Package: evince 3.10.0-0ubuntu2 ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3 Uname: Linux 3.11.0-12-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.12.5-0ubuntu2 Architecture: amd64 Date: Mon Oct 21 21:23:15 2013 InstallationDate: Installed on 2013-09-07 (44 days ago) InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424) MarkForUpload: True SourcePackage: evince UpgradeStatus: Upgraded to saucy on 2013-10-04 (16 days ago)
Not reproducible here.
(In reply to comment #1) > Not reproducible here. Thank you for testing and checking my report. I could confirm this issue on my desktop PC with Ubuntu saucy installed, and also on FRESH installed (or live boot) Ubuntu (desktop, saucy, amd64) on VirtualBox 4.3. So, what is your distro? If you are using debian or some other distro, could you try once again on Ubuntu?
Neither I can. I did both: - Opened the attached EPS in launchpad - Generated the EPS using the given command (gnuplot 4.4 patchlevel 3). I also tried with: - Evince 3.4.0 with poppler 0.18.0 and cairo 1.10.2 - Evince master (~3.10) with poppler master (~0.24.1) and cairo 1.12.17. FWIW, I use Ubuntu 12.04 (for the case of evince master does not matter that much). I'm inclined that the problem is somewhere else.
(In reply to comment #3) > FWIW, I use Ubuntu 12.04 (for the case of evince master does not matter that > much). I upgraded my Desktop from raring (13.04) to saucy (13.10) a few weeks ago. Before I upgrade, evince worked perfectly. So it seems this problem happens only in Ubuntu saucy. Can you try to reproduce with Ubuntu SAUCY? === > I'm inclined that the problem is somewhere else. I tested evince 3.4.0 from git repository on my desktop (Ubuntu saucy), and problem persists. $ git checkout 3.4.0 $ ./autogen.sh --prefix=$HOME/local --enable-ps $ make $ make install $ ~/local/bin/evince test.eps Therefor, i feel this is not an evince's bug...
Ubuntu's evince contains some patches, which could be responsible.
I downgraded libgs and libgs-common packages and this problem disappeared. So I conclude that changes in ghostscript caused this problem. I explored evince code, and i found that spectre_render_context_set_rotation(src, rotation); in backend/ps/ev-spectre.c does not work well for rotation=90 or 270. This results bad image data (char array) and actually cairo fails to render the image to produce the following message: (lt-evince:2164): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed So this could happen ALL (as far as i checked) postscript images if you rotate 90 or 270 degree in evince with current release of gs.
Could you somehow find out the Ghostscript command lines (or parameter lists for libgs calls) for both the non-working unrotated case and the working rotated case? Could you also find out the actual files sent to Ghostscript for rendering? To post an upstream bug report at Ghostscript (http://bugs.ghostscript.com/) I would need a way to reproduce the problem by a pure Ghostscript command line.
(the issue there is no due to evince distro changes but to libgs, either the new version is buggy or evince expects it to behave differently than it does)
Seems like the issue there is a libspectre one, see https://bugs.freedesktop.org/show_bug.cgi?id=76450
Also seeing this in Fedora 20 in Evince 3.103 (libspectre 0.2.7) and atril 1.8.0, with files generated by Madx (which uses gnuplot). (The file displays fine when rotated by 90 or 270deg).
Recent stacktrace:
+ Trace 235591
Thread 2 (Thread 0x7fffecb65700 (LWP 26828))
Closing this as NOTGNOME, as the bug is already being tracked for libspectre.