Bug 690387

Summary: Error: /rangecheck in resolveobjectstream
Product: Ghostscript Reporter: hardik <managedemo>
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: P4    
Version: 8.63   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---

Description hardik 2009-04-07 04:06:05 UTC
i did try to read pdf using ghostscript and i get the following error.
although for most of the pdf's it did ok but for following pdf i m getting 
error. here is the error.

pdf file i m trying is "http://www.polatalper.com/pdf/carettaocak2009.pdf"

command i m trying is 

bin/gs <pdfname>

   **** File has an unbalanced >> (close dictionary).
   **** Incorrect object count in object stream.
Error: /rangecheck in resolveobjectstream
Operand stack:
   --nostringval--   2   1   --nostringval--   --nostringval--   --nostringval-
-
   3552084   0   11   --dict:7/15(L)--   113   --nostringval--   false   --
nostr
ingval--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)-
-
   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dic
t:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7(L)
--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
d
ict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7(
L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   
-
-dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/
7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--
 --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --nostringval--   
Content
s   --nostringval--   CropBox   --nostringval--   MediaBox   --nostringval--
  Parent   --nostringval--   Resources   --nostringval--   Rotate   0   Type   
P
age   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   -
-
dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7
(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--
--dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7
/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--
  --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict
:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7(L)-
-   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
di
ct:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7(L
)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   -
-
dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --
dict:7/7
(L)--   --dict:7/7(L)--   --dict:7/7(L)--   --dict:3/3(L)--   --dict:4/4(L)--
--dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --
dict:4
/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--
  --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --
dict
:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--   --
dict:4/4(L)-
-   --dict:4/4(L)--   --dict:4/4(L)--   --dict:4/4(L)--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --
nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   
fa
lse   1   %stopped_push   1905   1   3   %oparray_pop   1904   1   3   
%oparray_
pop   1888   1   3   %oparray_pop   --nostringval--   --nostringval--   3   1
91   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval-
-
   --nostringval--   --nostringval--   %loop_continue   --nostringval--   2   1
  1   --nostringval--   %for_pos_int_continue   --nostringval--   --
nostringval-
-   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1156/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--   --
dict:75
/200(L)--   --dict:106/127(ro)(G)--   --dict:275/300(ro)(G)--   --
dict:23/25(L)-
-
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 8.63: Unrecoverable error, exit code 1
Comment 1 Ken Sharp 2009-04-07 04:10:45 UTC
*** Bug 690388 has been marked as a duplicate of this bug. ***
Comment 2 Ken Sharp 2009-04-07 04:21:33 UTC
Tried both 8.63 and 8.64 under Windows Vista, both work correctly for me (all 91
pages render without error to the display).

Possibly there is some difference with the way your executable has been built, I
notice that the executable is apparently named 'gs', whereas the standard
Ghostscript executable on Windows is named gswin32.exe.

Or perhaps you aren't really using Windows XP ?

The error is likely correct, Acrobat ignores many such syntax errors and as we
find them we modify Ghostscript to bypass them whenever possible. 

I don't really want to decompress and study a 91 page file so I would suggest
you first try upgrading to the current version, 8.64. 

If you can still reproduce the error please reopen the bug and give as much
detail as possible, particularly which OS you are using, and which page number
causes the problem.
Comment 3 hardik 2009-04-07 04:33:38 UTC
hi
i tried to do that now i m getting whats problem.
the person who has problem is using imagemagick

and he is trying to convert that pdf

command he is using is 

convert 1.pdf 1.jpg

and he is getting this error.
i also tried in my windows xp but i m getting error so if anyone having xp with 
version 8.63 ghostscript please try it.
Comment 4 Marcos H. Woehrmann 2009-04-07 08:31:30 UTC
I was able to reproduce this with gs8.63 on my MacBook Pro, but it has been fixed in gs8.64.  I don't 
know how imagemagick call Ghostscript, but if they execute the command line version you should be able 
to download a copy of 8.64 from ghostscript.com and replace the executable (if they use a library or dll 
you'll have to contact them for an update).