[cairo] Last *tiny* issues with 16.16 -> 24.8

Carl Worth cworth at cworth.org
Wed Feb 27 21:53:15 PST 2008


On Wed, 27 Feb 2008 16:05:23 -0800, Carl Worth wrote:
> cairo-ps crashes ghostscript
> ----------------------------
> Two tests are triggering crashes in ghostscript when it is run on the
> PostScript output from cairo-ps on the tests. The failing tests are:
>
> 	clip-operator
> 	push-group

If it seemed odd that the 24.8 change should cause ghostscript to
start crashing---good. It was very odd.

The crash was actually due to an unrelated change made a couple of
weeks ago. We recently made the PostScript output much more efficient
by using currentfile for image data so PostScript interpreters could
get at it directly. This is as opposed to the lame thing I originally
did where the image data was expressed in an array of strings. The
problem with that is that the PostScript interpreter would have to
allocate a bunch of memory to hold that string data, so printers
started getting really slow, (or outright failing).

So the non-string version is much better. Only, the end-of-stream
marker of ~> must never be broken by a newline (such as when wrapping
a line of PostScript output). We had code to ensure that, but it was
inadvertently restricted to the string-based stream emission, and not
the non-string version that uses currentfile.

So where does 24.8 come in? Only in that with the rasterization
changes it made, two of our test suite images just happened to now put
the ~> terminator right onto the linewrap boundary. So that's what
made ghostscript crash.

Anyway, the fix was trivial, (just move the protections outside of the
if (use_strings) block), and it's now in my 24.8 branch.

So all that's left now is the get-path-extents failure.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080227/f88d3f46/attachment.pgp 


More information about the cairo mailing list