[Bf-blender-cvs] [d9637fb] master: Fix T38745: Curve parent crash when rendering animation

Sergey Sharybin noreply at git.blender.org
Tue Feb 25 08:28:39 CET 2014


Commit: d9637fb3beb595c3e6387f79da500987cdea411e
Author: Sergey Sharybin
Date:   Tue Feb 25 13:15:59 2014 +0600
https://developer.blender.org/rBd9637fb3beb595c3e6387f79da500987cdea411e

Fix T38745: Curve parent crash when rendering animation

Issue was caused by curve orco calculation for rendering being freed
curve path and not calculating it back.

This left depsgraph in a state that it believed all the object data
is up to date but in fact some parts of data was freed by convert
blender.

Now made it so path is not being freed by render thread. This is
rather a workaround actually because ideally render thread need
to use copy-on-write here or at least use local cache here. But
current logic should be closer to what was happening in previous
release.

===================================================================

M	source/blender/blenkernel/intern/displist.c

===================================================================

diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index fee12f2..9582d87 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1377,8 +1377,14 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
 
 		BLI_freelistN(&(ob->curve_cache->bev));
 
-		if (ob->curve_cache->path) free_path(ob->curve_cache->path);
-		ob->curve_cache->path = NULL;
+		/* We only re-evlauate path if evaluation is not happening for orco.
+		 * If the calculation happens for orco, we should never free data which
+		 * was needed before and only not needed for orco calculation.
+		 */
+		if (!forOrco) {
+			if (ob->curve_cache->path) free_path(ob->curve_cache->path);
+			ob->curve_cache->path = NULL;
+		}
 
 		if (ob->type == OB_FONT) {
 			BKE_vfont_to_curve_nubase(G.main, ob, FO_EDIT, &nubase);




More information about the Bf-blender-cvs mailing list