Bug 693045 - **** File has unbalanced q/Q operators (too many Q's) ****
Summary: **** File has unbalanced q/Q operators (too many Q's) ****
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 9.05
Hardware: PC Windows 7
: P4 major
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 08:48 UTC by schipany
Modified: 2012-09-09 23:06 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
2 Log-Files and the test document. (1.28 MB, application/octet-stream)
2012-05-16 08:48 UTC, schipany
Details
i5.pdf -- simplified sample file (14.68 KB, application/pdf)
2012-05-21 05:03 UTC, Alex Cherepanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schipany 2012-05-16 08:48:28 UTC
Created attachment 8588 [details]
2 Log-Files and the test document.

9.0.5:
"ProgramFiles%\gs\gs9.05\bin\gswin32c.exe" -sDEVICE=tiff24nc -r96 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dSAFER -dBATCH -dNOPAUSE -sOutputFile="D:\14 - Aerzte GV (idF 1985
).tiff" "D:\14 - Aerzte GV (idF 1985).pdf" -c quit
**** File has unbalanced q/Q operators (too many Q's) ****
**** File has unbalanced q/Q operators (too many Q's) ****
endless loop!!!

9.0.4:
"ProgramFiles%\gs\gs9.04\bin\gswin32c.exe" -sDEVICE=tiff24nc -r96 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dSAFER -dBATCH -dNOPAUSE -sOutputFile="D:\14 - Aerzte GV (idF 1985
).tiff" "D:\14 - Aerzte GV (idF 1985).pdf" -c quit
   **** Error reading a content stream. The page may be incomplete.
   **** Warning: Pattern stream has unbalanced q/Q operators (too many q's)
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
Comment 1 Alex Cherepanov 2012-05-21 05:03:51 UTC
Created attachment 8604 [details]
i5.pdf -- simplified sample file

The sample file is incorrect. A few numbers in the file exceed the acceptable
range for numbers and cause a PS error.

Unfortunately, the error recovery code has an error of its own and
falls into a loop.
Comment 2 Alex Cherepanov 2012-09-09 23:06:20 UTC
A patch that
correctly restores PS stack when PDF stream run aborts
has been committed as:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=3a56f4eb5a9f15795725374b297edab0fb8ebc5d