Bug 694759 - PDF throws rangecheck in tiffsep
Summary: PDF throws rangecheck in tiffsep
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
: 695459 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-06 07:44 UTC by Jason Giglio
Modified: 2020-07-11 20:04 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Giglio 2013-11-06 07:44:47 UTC
This PDF is very complex, and causes gs to throw a rangecheck.  Adobe's engine will process the file very slowly.  Mupdf can render it, but it does not overprint the colorants.

sysadm@bourbon:~/gstest$ gsc -dBATCH -dNOPAUSE -dUseCropBox -sDEVICE=tiffsep -sOutputFile=./test -r300 -f 20889252901.pdf 
GPL Ghostscript GIT PRERELEASE 9.11 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
%%SeparationName: S05373
%%SeparationName: S01854
%%SeparationName: S03782
%%SeparationName: S09174
%%SeparationName: S05376
%%SeparationName: S04395
%%SeparationName: Varnish
%%SeparationName: Die
Error: /rangecheck in --showpage--
Operand stack:
   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1900   1   3   %oparray_pop   1899   1   3   %oparray_pop   1883   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   1777   0   9   %oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1169/1684(ro)(G)--   --dict:1/20(G)--   --dict:82/200(L)--   --dict:82/200(L)--   --dict:114/127(ro)(G)--   --dict:279/300(ro)(G)--   --dict:28/32(L)--   --dict:6/8(L)--   --dict:21/40(L)--
Current allocation mode is local
GPL Ghostscript GIT PRERELEASE 9.11: Unrecoverable error, exit code 1
Comment 1 Jason Giglio 2013-11-06 07:46:19 UTC
Created attachment 10375 [details]
file that triggers the rangecheck
Comment 2 Ken Sharp 2013-11-06 09:36:27 UTC
This isn't the PDF interpreter, its highly specific to the tiffsep device, and its 'something' to do with downscaling (I know, we're not downscaling, but it still goes through here).

In gdevtsep.c, line 2303:

            for (y = 0; y < height; ++y) {
                code = gx_downscaler_get_bits_rectangle(&ds, &params, y);

the rangecheck is returned from gx_downscaler_get_bits_rectangle(), but this really is down to the clist. The code is returned in gxclread.c, at line 628:

    code = clist_rasterize_lines(dev, y, line_count, bdev, &render_plane, &my);
    if (code < 0)
        return code;

Since its a clist problem, assigning to Ray
Comment 3 shez 2014-05-12 14:54:22 UTC
Hi,

We have this issue as well.  Investigation shows that for us it was introduced between versions 9.05 and 9.06

git bisect shows that the first 'bad commit' was:
commit 60640aeb33b18f9a9fcd76fc6f1083d7c7635f24
Author: Robin Watts <robin.watts@artifex.com>
Date:   Fri Apr 27 18:46:27 2012 +0100

    * Change of the tiffsep and psdcmyk device to planar devices.


This version introduced a segmentation fault, but given the scope of this change it  could be where the issue was introduced?
Cheers
Shez
Comment 4 Ken Sharp 2016-10-18 09:16:21 UTC
*** Bug 695459 has been marked as a duplicate of this bug. ***
Comment 5 Peter Cherepanov 2020-07-11 04:18:21 UTC
This problem existed in v.9.06 .. v.9.20 but it was fixed in recent releases and current development version.

This bug report can be closed.