GNOME Bugzilla – Bug 353802
handle esp ghostscript interpreter crash better
Last modified: 2007-02-11 19:20: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.
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
Created attachment 74676 [details] [review] patch
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.
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. :-)
why is that bug NEEDINFO? What info do you need?
No idea really, thanks Andre for corrections too.
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..."
hmm, problem is actually fixed indeed, so closing.