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 353802 - handle esp ghostscript interpreter crash better
handle esp ghostscript interpreter crash better
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: PS
git master
Other Linux
: High critical
: 0.10
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-09-01 09:57 UTC by Daniel Holbach
Modified: 2007-02-11 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (428 bytes, patch)
2006-10-14 06:10 UTC, Christof Krüger
none Details | Review

Description Daniel Holbach 2006-09-01 09:57:23 UTC
Binary package hint: evince

Forwarded from: https://launchpad.net/distros/ubuntu/+source/evince/+bug/58141

Ubuntu 6.06.1, Evince 0.5.2

I tried to open postscript (.ps) file in Ubuntu 6.06. Evince 0.5.2 was started but it displayed only "Loading". For long time. No error.

I found that postscript compiler (like gs-gpl) was not instaled on my system. After installing postscript interpreter, Evince worked fine.

I report this as a bug as there was no error message from Evince that it miss postscript support that is needed to open the file.

Observed on this package:
http://www.terryburton.co.uk/barcodewriter/files/postscriptbarcode.tgz

This is a gz archive, that has several ps files inside; it could be open with archiver (Fle Roller 2.14.4) and after that you can start Evince by selecting some ps file from this archive.

On the other side, I can open this file with the same Evince without any problem:
http://local.wasp.uwa.edu.au/~pbourke/dataformats/postscript/4.ps


1) echo "This is just a evince bug demonstartion" >test.pdf
2) evince test.ps
3) you will see only "loading..." forever, no error message that test.ps is not correct postscript file.

You can see some error message in command line but user that has no knowladge about command line and he only use mouse to open files will never see such message. And it is clear that evince ignores message from postscript interpreter. 


This is somewhat like bug 326859.
Comment 1 Christian Kirbach 2006-09-01 19:34:07 UTC
I can reproduce. The gs interpreter seems to crash, but evince does not consider that.

nazgul@dragonscale:~/Desktop$ evince sample.ps
/home/nazgul/.themes/Clearlooks-Quicksilver/gtk-2.0/gtkrc:57: error: unexpected identifier `animation', expected character `}'
ERROR: /undefined in code39
Operand stack:
   (CODE 39)   (includecheck includetext)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3 %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1123/1686(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--
Current allocation mode is local
Current file position is 165
ESP Ghostscript 815.02: Unrecoverable error, exit code 1

(evince:5983): Gtk-CRITICAL **: gtk_tree_model_foreach: assertion `GTK_IS_TREE_MODEL (model)' failed

(evince:5983): Gtk-CRITICAL **: gtk_list_store_clear: assertion `GTK_IS_LIST_STORE (list_store)' failed
Comment 2 Christof Krüger 2006-10-14 06:10:59 UTC
Created attachment 74676 [details] [review]
patch
Comment 3 Christof Krüger 2006-10-14 06:11:30 UTC
I find this bug quite annoying because I experimented with postscript and wanted to just refresh the view in evince whenever I changed the ps-source file.

For this reason I looked into the sources and played around with gdb a bit.

I could trace this down to line 524 in ps/ps-document.c.
I don't understand why gs->interpreter_output is tested for equality with -1 in this line. Apparently, we received output on the stderr stream from gs with bytes > 0. We should do something about it (invoke interpreter_failed) or otherwise ghostscript will die and leave a defunct process and evince thinking that it is still there.

I'd suggest to remove the conditional statement and call interpreter_failed unconditionally. This works for me perfectly. (Patch above)

This does not solve the problem with not having any visible error message though.
Comment 4 André Klapper 2007-01-17 02:30:57 UTC
Doesn't look like it should have been on gnome-target at all.
Nickolay:
gnome-target is meant to be used on bugs severe enough to possibly require
delaying GNOME releases, and this does not look like it's such a case.
The target milestone is the field you want for bugs you'd like to remember to fix by a certain release.  You can add target milestones for your product by clicking on the "Edit this product" link in the lower-right hand corner of the browse.cgi ("product overview") page.  See also the "Target Milestone" and "GNOME Target Milestone" sections of http://bugzilla.gnome.org/page.cgi?id=bug-status.html.  :-)
Comment 5 Sebastien Bacher 2007-01-17 09:06:33 UTC
why is that bug NEEDINFO? What info do you need?
Comment 6 Nickolay V. Shmyrev 2007-01-22 07:54:41 UTC
No idea really, thanks Andre for corrections too.
Comment 7 Carlos Garcia Campos 2007-02-03 12:02:27 UTC
I've just committed a patch to handle ghostscript interpreter crashes. It doesn't fix the bug because there is no error message (only on stdout) yet, but at least evince doesn't hang forever showing "loading..."
Comment 8 Carlos Garcia Campos 2007-02-11 19:20:23 UTC
hmm, problem is actually fixed indeed, so closing.