[gs-bugs] [Bug 691493] Infinite loop when rendering a PDF file

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Jul 28 18:24:58 UTC 2010


--- Comment #7 from Robin Watts <robin.watts at artifex.com> 2010-07-28 18:24:56 UTC ---
This is a problem with the changes I made to the pattern_cache for the
gs_2_colors code.

What should happen is that the stroke operator will be executed, and notice
that a pattern colour is in force, but that it's not cached. It then exits,
leaving the stroke operator on the stack, to "prepare" the pattern (i.e. run
its paint procedure). When this finishes, the stroke operator is run again, and
this time the pattern should be cached.

For some reason this isn't working.

In looking at this code it has made me reevaluate a decision made while doing
the gs_2_colors work, in that I had split the pattern_cache into two. I
believed that the pattern_cache contained cached rendered versions of the
current colour, but this is not quite true. The pattern_cache is actually a
cache of rendered versions, indexed by colour index. This means that multiple
different pattern colours can have entries in the cache at once - hence I do
not need to have 2 separate pattern caches.

This means I can remove the 'alternative' pattern_cache and the code to swap
between the two. Local testing shows this solves the infinite loop. A
localcluster test looks good too - just confirming with a bmpcmp on the few
differences (that I think are indeterminisms).

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list