[cairo-bugs] [Bug 74779] Segmentation fault when using a complex path for clip and stroke

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 31 23:06:48 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=74779

Massimo <sixtysix at inwind.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104163|0                           |1
        is obsolete|                            |
 Attachment #104273|0                           |1
        is obsolete|                            |
 Attachment #104274|0                           |1
        is obsolete|                            |

--- Comment #9 from Massimo <sixtysix at inwind.it> ---
Created attachment 105530
  --> https://bugs.freedesktop.org/attachment.cgi?id=105530&action=edit
proposed patch


This patch superesedes the previous.

The problem seems to be that flooring (or rounding to the nearest)
intersections and processing START events after INTERSECTION events
causes an inversion in the active edge list, that is it happens
that introducing new edges at the same y of a floored intersection
finds two or more edges already swapped and
event_queue_insert_if_intersect_below_current_y enqueues intersections
events above the current sweep_line position because slope_compare is
incorrectly assuming left to be the left edge and right the right one.


The patched implementation of the sweep_line instead considers edges
as translated upward and shrinked by 1 and 2 epsilon.

It means that all edge lower vertices are considered positioned at
an y = nominal y - 2 * epsilon, the upper points at y - epsilon.

It follows that events having the same y are processed in the order:

STOP prior than START prior than INTERSECTION (floored to integer).

This way START and STOP events should find the active-edges
list correctly sorted, and sorting the new edges also using
slope_compare should not miss intersection, nor move the sweep line
back and forth.

Here it fixes the 3 test cases attached to this report and the 2 scripts
attached to bug 59098, plus I can open in evince the pdf mentioned in

https://bugzilla.redhat.com/show_bug.cgi?id=1134832

with the side panel (thumb pages) visible.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140901/107df548/attachment.html>


More information about the cairo-bugs mailing list