[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42599] trunk/blender/source/blender/ blenkernel/intern/tracking.c: Fixed crash when tracking several tracks manually

Sergey Sharybin sergey.vfx at gmail.com
Tue Dec 13 11:07:27 CET 2011


Revision: 42599
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42599
Author:   nazgul
Date:     2011-12-13 10:07:22 +0000 (Tue, 13 Dec 2011)
Log Message:
-----------
Fixed crash when tracking several tracks manually

Crash was caused by non-threadsafe guarded allocatio which becomes
threadsafe only when thread was started using BLI_threads module.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/tracking.c

Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/tracking.c	2011-12-13 09:57:19 UTC (rev 42598)
+++ trunk/blender/source/blender/blenkernel/intern/tracking.c	2011-12-13 10:07:22 UTC (rev 42599)
@@ -48,6 +48,7 @@
 #include "BLI_ghash.h"
 #include "BLI_path_util.h"
 #include "BLI_string.h"
+#include "BLI_threads.h"
 
 #include "BKE_global.h"
 #include "BKE_tracking.h"
@@ -830,6 +831,8 @@
 	context->clip= clip;
 	context->user= *user;
 
+	BLI_begin_threaded_malloc();
+
 	return context;
 }
 
@@ -856,6 +859,8 @@
 
 void BKE_tracking_context_free(MovieTrackingContext *context)
 {
+	BLI_end_threaded_malloc();
+
 	tracks_map_free(context->tracks_map, track_context_free);
 
 	MEM_freeN(context);




More information about the Bf-blender-cvs mailing list