From 2559fb1d0df32bb30bf35448913fa96b33e6a423 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 23 Aug 2011 10:58:09 +0100 Subject: [PATCH] actor: Add a comment on the unmapping order Let's add a comment to avoid reshuffling the unmap() implementation and end up triggering these bugs: http://bugzilla.clutter-project.org/show_bug.cgi?id=2621 https://bugzilla.gnome.org/show_bug.cgi?id=652036 --- clutter/clutter-actor.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 538f95c86..ed76d930a 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -8329,7 +8329,17 @@ clutter_actor_unparent (ClutterActor *self) /* We take this opportunity to invalidate any queue redraw entry * associated with the actor and descendants since we won't be able to - * determine the appropriate stage after this. */ + * determine the appropriate stage after this. + * + * we do this after we updated the mapped state because actors might + * end up queueing redraws inside their mapped/unmapped virtual + * functions, and if we invalidate the redraw entry we could end up + * with an inconsistent state and weird memory corruption. see + * bugs: + * + * http://bugzilla.clutter-project.org/show_bug.cgi?id=2621 + * https://bugzilla.gnome.org/show_bug.cgi?id=652036 + */ _clutter_actor_traverse (self, 0, invalidate_queue_redraw_entry,