Re: Segfault at sweep_line_delete on video playback

James Cloos <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
>>>>> "JC" == James Cloos <[email protected]> writes:

JC> This patch should do what Bryce intended, but appears to trigger:

JC> ,----
JC> | Program received signal SIGSEGV, Segmentation fault.
JC> | _cairo_clip_path_destroy (clip_path=0x0) at cairo-clip.c:91
JC> | 91	    assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&clip_path->ref_count));
JC> `----

My second patch (don't dereference rectangle->left.prev if it is null)
which ends up returning TRUE from sweep_line_delete() also produces that
same assert.

A change probably is required instead in:

_cairo_bentley_ottmann_tessellate_rectangular()

from which sweep_line_delete() is called.

Or perhaps in rectangle_peek_stop(), which creates the rectangle_t in question.

Of course, the existence of assert()s in a library is a bug in itself.

If _cairo_clip_path_destroy() gets a NULL it should just return.

-JimC
--
James Cloos <[email protected]>         OpenPGP: 1024D/ED7DAEA6
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.