[cairo-bugs] [Bug 91967] Assertion "(_cairo_atomic_int_get (&(&surface->ref_count)->ref_count) > 0)"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 17 09:45:09 UTC 2016


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

--- Comment #34 from Jaroslav Škarvada <jskarvad at redhat.com> ---
(In reply to Alberts Muktupāvels from comment #33)
> (In reply to Bryce Harrington from comment #32)
> > What about setting "image = NULL" after the destruction and then just adding
> > an "if (image)" before the cairo_surface_destroy call in BAIL?
> 
> ? I guess this is exactly what my patch does, no? cairo_surface_destroy is
> NULL safe so there is no need to add 'if (image)', but if you want I can
> update patch.

Yup, we are at the beginning. The 'image = NULL' will do the job as well as
stated several times in this BZ. But from the comments above and code
inspection (you mostly don't set the pointers to NULLs after destruction, but
rather use assertion) I understand that you want the code path/algorithm clean
and that that's the reason of the assertion - to detect and clean all wrong
paths.

But even with the image = NULL, you still need to add NOOP error handlers to X
calls, because they may still fail with 'invalid pixmap'. The X error handling
is asynchronous but mostly with assertion somewhere, so without the NOOP error
handlers it can also coredump sooner or later.

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


More information about the cairo-bugs mailing list