[cairo-bugs] [Bug 41409] Assertion when marking as dirty a surface on which no Cairo operations have been made

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 8 03:41:32 PDT 2011


ogg.k.ogg.k at googlemail.com changed:

           What    |Removed                     |Added
           Severity|normal                      |major

--- Comment #1 from ogg.k.ogg.k at googlemail.com 2011-10-08 03:41:30 PDT ---
I don't have all the prerequisites to build Cairo atm, but I think this might
do it - untested since I cannot build right now:

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 8488380..26aa72e 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1312,6 +1312,8 @@ cairo_surface_flush (cairo_surface_t *surface)
     if (surface->finished)

+    _cairo_surface_begin_modification (surface);
     /* update the current snapshots *before* the user updates the surface */
     _cairo_surface_detach_snapshots (surface);

By the way, if this usage is not a valid one, please say so. The docs seem to
say this should be done that way, but it's a corner case.

And since it actually "crashes" the user program, I'm setting it as major for

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

More information about the cairo-bugs mailing list