[PATCH weston] Don't manipulate lists while tranversing the list (was: remove all running animations...)

Bryce Harrington bryce at osg.samsung.com
Tue Apr 14 13:45:12 PDT 2015


On Tue, Apr 14, 2015 at 09:41:13AM +0300, Pekka Paalanen wrote:
> On Mon, 13 Apr 2015 22:47:00 -0500
> Derek Foreman <derekf at osg.samsung.com> wrote:
> 
> > On 13/04/15 07:15 AM, Pekka Paalanen wrote:
> > > Maybe the closing animation ending should just schedule an idle task to
> > > destroy the surface?
> > 
> > I don't think I can think of a valid reason to disagree - would you like
> > me to fix it that way?
> 
> I think that would be the best, yes. We could make it a rule of thumb:
> never destroy weston_views or weston_surfaces from animation hooks.
> With that simple rule in place, all similar future bugs would be
> avoided. It would be a generic solution to a generic class of bugs.
> 
> That rule has a lot of potential for further generalizations, because
> the essence of the problem is manipulating a list while traversing the
> list. "Don't destroy weston_views from weston_view signals" etc.



>From e12a186ab032d02edd8673f194f5c3a0ffe8ce93 Mon Sep 17 00:00:00 2001
From: Bryce Harrington <bryce at osg.samsung.com>
Date: Tue, 14 Apr 2015 13:43:06 -0700
Subject: [PATCH] notes: Don't manipulate lists while tranversing the list

Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
 notes.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/notes.txt b/notes.txt
index e49052b..ba434a3 100644
--- a/notes.txt
+++ b/notes.txt
@@ -5,6 +5,16 @@ mentioned. Let's keep these in date order, newest first.
 
 
 -----------------------------------------------------------------------
+2015-04-14; Pekka Paalanen <ppaalanen at gmail.com>
+http://lists.freedesktop.org/archives/wayland-devel/2015-April/021309.html
+
+Never destroy weston_views or weston_surfaces from animation hooks.
+Never destroy weston_views from weston_view signals.
+
+Basically, never manipulate a list while transversing it.
+
+
+-----------------------------------------------------------------------
 2012-10-23; Pekka Paalanen <ppaalanen at gmail.com>
 http://lists.freedesktop.org/archives/wayland-devel/2012-October/005969.html
 
-- 
1.9.1



More information about the wayland-devel mailing list