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 710957 - evince cannot render some EPS files
evince cannot render some EPS files
Status: RESOLVED NOTGNOME
Product: evince
Classification: Core
Component: PS
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-27 09:13 UTC by epii
Modified: 2015-10-16 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description epii 2013-10-27 09:13:53 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)
Comment 1 Christian Persch 2013-10-27 11:41:02 UTC
Not reproducible here.
Comment 2 epii 2013-10-28 03:43:28 UTC
(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?
Comment 3 Germán Poo-Caamaño 2013-10-28 04:50:24 UTC
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.
Comment 4 epii 2013-10-28 06:20:28 UTC
(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...
Comment 5 Christian Persch 2013-10-28 11:30:13 UTC
Ubuntu's evince contains some patches, which could be responsible.
Comment 6 epii 2013-10-28 15:44:08 UTC
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.
Comment 7 Till Kamppeter 2014-01-23 16:16:14 UTC
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.
Comment 8 Sebastien Bacher 2014-02-13 10:01:01 UTC
(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)
Comment 9 Sebastien Bacher 2014-04-02 14:21:18 UTC
Seems like the issue there is a libspectre one, see https://bugs.freedesktop.org/show_bug.cgi?id=76450
Comment 10 sam tygier 2014-08-29 15:48:32 UTC
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).
Comment 11 Germán Poo-Caamaño 2015-10-16 18:52:02 UTC
Recent stacktrace:

Thread 2 (Thread 0x7fffecb65700 (LWP 26828))

  • #0 names_ref
    from /usr/lib/libgs.so.9
  • #1 gs_scan_token
    from /usr/lib/libgs.so.9
  • #2 ??
    from /usr/lib/libgs.so.9
  • #3 gs_interpret
    from /usr/lib/libgs.so.9
  • #4 ??
    from /usr/lib/libgs.so.9
  • #5 gs_main_init2aux
    from /usr/lib/libgs.so.9
  • #6 gs_main_init2
    from /usr/lib/libgs.so.9
  • #7 gs_main_init_with_args
    from /usr/lib/libgs.so.9
  • #8 spectre_gs_run
    at spectre-gs.c line 190
  • #9 spectre_device_render
    at spectre-device.c line 264
  • #10 spectre_page_render
    at spectre-page.c line 164
  • #11 ps_document_render
    at ev-spectre.c line 312
  • #12 ev_job_render_run
    at ev-jobs.c line 639
  • #13 ev_job_thread
    at ev-job-scheduler.c line 184
  • #14 ev_job_thread_proxy
    at ev-job-scheduler.c line 217
  • #15 g_thread_proxy
    at gthread.c line 764
  • #16 start_thread
    at pthread_create.c line 333
  • #17 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Closing this as NOTGNOME, as the bug is already being tracked for libspectre.