[cups.bugs] filter/image.c cache file failure

Ted Marston ted at waxworlds.org
Wed Aug 10 06:44:41 PDT 2011


Hi, new to this group, but need to report a bug (with its fix) in
cups-1.4.6 and cups-1.5.0. The symptom is that large graphics files
get broken up into chunks, repeated over the printout because the
cachefile in filter/image.c is never opened and dirty cached image
tiles are not saved when they are flushed out of the cache.

I've this also reported of by Brad Allen on Nov 28, 2009, at
http://www.cups.org/newsgroups.php?s1+gcups.development+v1+T0+Qimagetops

That site didnt respond when I tried to register, so I'm trying here
instead.

One fix is to correct the test for an un-opened cachefile in
filter/image.c: flush_tile():

diff filter/image.c.Orig filter/image.c
636c636
<   if (img->cachefile < 0)
---
>   if (img->cachefile == 0)

This works because the cups_image_t is initialised with zeroes by
calloc() in filter/image.c: cupsImageOpen(). The zero indicates to
flush_tile() that a cachefile has not been opened yet. It will only
be < 0 after cupsTempFd() has failed to open a cachefile.

I hope someone with better connections can pass this on.

Thanks.

Ted Marston





More information about the cups-devel mailing list