Bug 693586 - clist error message
Summary: clist error message
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: 9.05
Hardware: PC All
: P4 normal
Assignee: Henry Stiles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 15:24 UTC by Henry Stiles
Modified: 2013-01-27 05:12 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
clist error (106.38 KB, application/octet-stream)
2013-01-25 15:24 UTC, Henry Stiles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Stiles 2013-01-25 15:24:20 UTC
Created attachment 9245 [details]
clist error

pcl6 -sDEVICE=ppmraw -o out.ppm temp2.prn produces:

GPL Ghostscript GIT PRERELEASE 9.07: ../gs/base/gxclimag.c(825): end_image id = 236 != clist image id = 0!
GPL Ghostscript GIT PRERELEASE 9.07: ../gs/base/gxclimag.c(1067): end_image id = 236 != clist image id = 0!

Note the resolution is set in the file with PJL (600).
Comment 1 Ray Johnston 2013-01-25 18:11:31 UTC
The problem (as described to Henry on IRC) is that the pcl outputs the page
when it finds an EOF, but then when it calls 'close_job', it calls close_raster
and finds that there are still 122 lines left to send for the image.

It uses 'process_zero_rows' for this, but since the clist cdev->image_enum_id
was reset (by clist_reset after the page was output), when we come into
clist_image_plane_data, there was no clist_begin_image call on the next page,
so this function prints the error message and returns gs_error_Fatal (as
it should).

In page mode, the default gx_image_plane_data_rows proceeds merrily along
and ends up calling 'fill_rectangle' to paint the rows on the new page, so
there is no error.

Assigning back to Henry to fix the PCL.
Comment 2 Henry Stiles 2013-01-27 05:12:33 UTC
commit 152d0cec22438acbb6a5cd50a65b0f9f8c729195
Author: Henry Stiles <henry.stiles@artifex.com>
Date:   Sat Jan 26 21:47:12 2013 -0700

    Fix bug #693586 - clist error message.

    The error was caused by sending image data to the library after the
    page was output, now graphics mode is flushed and closed before the
    page is output.  The bug was introduced by ea54a03 which closed
    graphics mode at the time of "end job" which could occur after output
    page.  We do need to leave that commit intact as the job could end
    without outputting a page, and the raster state would not be cleaned
    up.