Bug 17379 - evince cannot show pages 1 and 2 from attached postscript file
Summary: evince cannot show pages 1 and 2 from attached postscript file
Status: RESOLVED NOTOURBUG
Alias: None
Product: libspectre
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Carlos Garcia Campos
QA Contact: Carlos Garcia Campos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-31 11:00 UTC by Pacho Ramos
Modified: 2010-04-09 10:58 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
et-rotate.ps.gz (422.67 KB, application/x-gzip)
2008-08-31 11:00 UTC, Pacho Ramos
Details
File exhibiting the bug (43.18 KB, application/postscript)
2008-11-13 16:10 UTC, Médéric Boquien
Details
postscript file that is not displayed (104.46 KB, application/postscript)
2010-04-05 10:04 UTC, pogosyan
Details

Description Pacho Ramos 2008-08-31 11:00:16 UTC
Created attachment 18603 [details]
et-rotate.ps.gz

I previusly reported this to:
http://bugzilla.gnome.org/show_bug.cgi?id=545368

I have tried with libspectre-0.2.1, now, pages 3 and 4 are properly shown (without strange characters), but evince still cannot show pages 1 and 2, it only shows "Loading" message forever

I get the following when running it from a terminal:
rangecheck -15
rangecheck -15
rangecheck -15
rangecheck -15
rangecheck -15
rangecheck -15

** (evince:5790): WARNING **: Error rendering thumbnail

"gv" shows fine the whole file
Comment 1 Carlos Garcia Campos 2008-09-01 00:26:40 UTC
I cannot reproduce it, what gs version do you have?
Comment 2 Pacho Ramos 2008-09-01 12:20:39 UTC
I have app-text/ghostscript-gpl-8.63
Comment 3 Pacho Ramos 2008-09-12 05:24:23 UTC
I get the same with ghostscript-gpl-8.62
Comment 4 Carlos Garcia Campos 2008-09-15 00:45:33 UTC
I've just upgraded to gs 8.63 and I still cannot reproduce it, so I don't known where is the problem but it doesn't seem to be a gs issue. 
Comment 5 Médéric Boquien 2008-11-13 16:10:42 UTC
Created attachment 20289 [details]
File exhibiting the bug

Hello,

I have a similar bug with Okular and libspectre 0.2.0 (confirmed with 0.2.1 by Pino Toscano) with the attached file. I get the same error message (rangecheck -15) and the page is not rendered. I hope it can help reproduce the bug. The file works fine invoking gs 8.62.

Thanks,

Médéric
Comment 6 Carlos Garcia Campos 2008-11-23 07:58:46 UTC
(In reply to comment #5)
> Created an attachment (id=20289) [details]
> File exhibiting the bug
> 
> Hello,
> 
> I have a similar bug with Okular and libspectre 0.2.0 (confirmed with 0.2.1 by
> Pino Toscano) with the attached file. I get the same error message (rangecheck
> -15) and the page is not rendered. I hope it can help reproduce the bug. The
> file works fine invoking gs 8.62.
>

This document works for me too. 

Comment 7 Pacho Ramos 2008-11-23 11:00:36 UTC
It fails with my system instead :'(
Comment 8 Pacho Ramos 2009-03-20 13:24:03 UTC
Still valid, what is more surprising is that affected postscript files are generated by epiphany when printing to a file

Gimp open them fine on the other hand :-/
Comment 9 Albert Astals Cid 2009-03-21 12:39:24 UTC
Doing 

-#define BUFFER_SIZE 32768
+#define BUFFER_SIZE 1024*1024*1024

gets me something rendered on page 1 and page 2, but not all content still.

It the rangecheck -15 error is because gs does not like we feed it "things" partially and increasing the buffer size is a "easy" way to fix it. 

Still no idea why feeding it all at once like we do with such a big buffer doesn't give the correct rendering.
Comment 10 Carlos Garcia Campos 2009-03-22 09:47:19 UTC
(In reply to comment #9)
> Doing 
> 
> -#define BUFFER_SIZE 32768
> +#define BUFFER_SIZE 1024*1024*1024
> 
> gets me something rendered on page 1 and page 2, but not all content still.
> 
> It the rangecheck -15 error is because gs does not like we feed it "things"
> partially and increasing the buffer size is a "easy" way to fix it. 
> 
> Still no idea why feeding it all at once like we do with such a big buffer
> doesn't give the correct rendering.
> 

Accordng to the gs documentation:

"There is a 64 KB length limit on any buffer submitted to a gsapi_run_* function for processing. If you have more than 65535 bytes of input then you must split it into smaller pieces and submit each in a separate gsapi_run_string_continue() call."

I don't know what to do to fix it, since it's not reproducible for me. 
Comment 11 Pacho Ramos 2009-03-22 11:08:04 UTC
I can reproduce it, but I have no idea about programming :-(, then, I can only offer me for testing purposes, do you want me to try anything?
Comment 12 Albert Astals Cid 2009-03-22 14:27:53 UTC
That is quite interesting, if i use a buffer size of 65535 i get the rangecheck error if i use 65536 i do not (but get an empty page) i'd try to ping gs people as maybe it's a problem in their side.
Comment 13 pogosyan 2010-04-05 10:04:39 UTC
Created attachment 34681 [details]
postscript file that is not displayed
Comment 14 pogosyan 2010-04-05 10:07:53 UTC
Have to add that a year later I experience the same problem under Gentoo with

okular-4.5.3
libspectre-0.2.1 or 0.2.4
ghostscript-gpl-8.64

I have attached one of my problem files, and can confirm that previously attached files are not displayed.

gv  , on the other hand, display all my files correctly.
Comment 15 pogosyan 2010-04-05 10:14:57 UTC
(In reply to comment #14)
> Have to add that a year later I experience the same problem under Gentoo with
> 
> okular-4.5.3
> libspectre-0.2.1 or 0.2.4
> ghostscript-gpl-8.64
> 
> I have attached one of my problem files, and can confirm that previously
> attached files are not displayed.
> 
> gv  , on the other hand, display all my files correctly.

Sorry, okular-4.3.5 of course
Comment 16 Carlos Garcia Campos 2010-04-05 11:23:08 UTC
Still not reproducible for me :-( hmm, are you guys running libspectre on a 32 or 64 bit system?
Comment 17 Pacho Ramos 2010-04-05 11:40:09 UTC
On a 64 bits system in my case
Comment 18 Albert Astals Cid 2010-04-05 12:00:12 UTC
64 bits
ghostscript  8.70.dfsg.1-0ubuntu3
okular       4.4.2-0ubuntu1~karmic1~ppa1 
libspectre   0.2.2.ds-2
evince       2.28.1-0ubuntu1.2 

All attachments work
Comment 19 pogosyan 2010-04-06 06:39:44 UTC
(In reply to comment #16)
> Still not reproducible for me :-( hmm, are you guys running libspectre on a 32
> or 64 bit system?

64 bit
Comment 20 Carlos Garcia Campos 2010-04-06 08:15:39 UTC
Could you try again with libspectre from git master, please?
Comment 21 pogosyan 2010-04-06 09:14:20 UTC
I have upgraded to ghostscript-gpl-8.71  and everything works now.
Comment 22 Carlos Garcia Campos 2010-04-07 03:09:26 UTC
(In reply to comment #17)
> On a 64 bits system in my case

and which ghostscript version?
Comment 23 Pacho Ramos 2010-04-07 04:47:16 UTC
I am still with 8.70, I will try to update to the latest one supplied with Gentoo (well, ghostcript seems to be patched a lot depending on distributions)
Comment 24 Pacho Ramos 2010-04-09 05:17:44 UTC
Solved by ghostscript-8.71 with -r3 gentoo revision. It was a ghostscript problem then :-O

Best regards
Comment 25 pogosyan 2010-04-09 10:58:27 UTC
(In reply to comment #24)
> Solved by ghostscript-8.71 with -r3 gentoo revision. It was a ghostscript
> problem then :-O
> 
> Best regards

I wonder, what was the problem


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.