[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55566] trunk/blender/source/blender/ compositor/intern/COM_ExecutionSystemHelper.cpp: Fix #34758, another Crash with NodeGroup.

Lukas Toenne lukas.toenne at googlemail.com
Mon Mar 25 12:08:15 CET 2013


Revision: 55566
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55566
Author:   lukastoenne
Date:     2013-03-25 11:08:14 +0000 (Mon, 25 Mar 2013)
Log Message:
-----------
Fix #34758, another Crash with NodeGroup. Took a while to get to the bottom, but the root of the issue was that nested node groups (groups inside other groups) were ungrouped ("inlined") repeatedly. This lead to preview operations being added to the same group more than once, and the redundant preview operations (beside working on the same preview buffer) did not get their correct resolution set. This in turn would then lead to previews writing beyond allocated size and causing corrupted memory + crash.

Simple fix: don't expand node groups more than once.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp

Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp	2013-03-25 08:30:38 UTC (rev 55565)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp	2013-03-25 11:08:14 UTC (rev 55566)
@@ -69,8 +69,11 @@
 		nodelink = nodelink->next;
 	}
 
-	/* Expand group nodes */
-	for (unsigned int i = nodes_start; i < nodes.size(); ++i) {
+	/* Expand group nodes
+	 * Only go up to nodes_end, to avoid ungrouping nested node groups repeatedly.
+	 */
+	int nodes_end = nodes.size();
+	for (unsigned int i = nodes_start; i < nodes_end; ++i) {
 		Node *execnode = nodes[i];
 		if (execnode->isGroupNode()) {
 			GroupNode *groupNode = (GroupNode *)execnode;




More information about the Bf-blender-cvs mailing list