[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43453] trunk/blender: fix for segfault with bpy compiled as python module (dont register atexit)

Campbell Barton ideasman42 at gmail.com
Tue Jan 17 16:19:16 CET 2012


Revision: 43453
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43453
Author:   campbellbarton
Date:     2012-01-17 15:19:11 +0000 (Tue, 17 Jan 2012)
Log Message:
-----------
fix for segfault with bpy compiled as python module (dont register atexit)
    
update `make lite` built target to remove some newly added features.

Modified Paths:
--------------
    trunk/blender/build_files/cmake/config/blender_lite.cmake
    trunk/blender/source/blender/python/intern/bpy_interface.c

Modified: trunk/blender/build_files/cmake/config/blender_lite.cmake
===================================================================
--- trunk/blender/build_files/cmake/config/blender_lite.cmake	2012-01-17 14:21:27 UTC (rev 43452)
+++ trunk/blender/build_files/cmake/config/blender_lite.cmake	2012-01-17 15:19:11 UTC (rev 43453)
@@ -15,6 +15,7 @@
 set(WITH_CYCLES              OFF CACHE FORCE BOOL)
 set(WITH_FFTW3               OFF CACHE FORCE BOOL)
 set(WITH_LIBMV               OFF CACHE FORCE BOOL)
+set(WITH_CARVE               OFF CACHE FORCE BOOL)
 set(WITH_GAMEENGINE          OFF CACHE FORCE BOOL)
 set(WITH_IK_ITASC            OFF CACHE FORCE BOOL)
 set(WITH_IMAGE_CINEON        OFF CACHE FORCE BOOL)
@@ -33,6 +34,7 @@
 set(WITH_MOD_BOOLEAN         OFF CACHE FORCE BOOL)
 set(WITH_MOD_DECIMATE        OFF CACHE FORCE BOOL)
 set(WITH_MOD_FLUID           OFF CACHE FORCE BOOL)
+set(WITH_MOD_REMESH          OFF CACHE FORCE BOOL)
 set(WITH_MOD_SMOKE           OFF CACHE FORCE BOOL)
 set(WITH_MOD_OCEANSIM        OFF CACHE FORCE BOOL)
 set(WITH_AUDASPACE           OFF CACHE FORCE BOOL)
@@ -43,3 +45,4 @@
 set(WITH_RAYOPTIMIZATION     OFF CACHE FORCE BOOL)
 set(WITH_SDL                 OFF CACHE FORCE BOOL)
 set(WITH_X11_XINPUT          OFF CACHE FORCE BOOL)
+set(WITH_X11_XF86VMODE       OFF CACHE FORCE BOOL)

Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c	2012-01-17 14:21:27 UTC (rev 43452)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c	2012-01-17 15:19:11 UTC (rev 43453)
@@ -267,9 +267,10 @@
 	
 	pyrna_alloc_types();
 
+#ifndef WITH_PYTHON_MODULE
+	/* py module runs atexit when bpy is freed */
 	BPY_atexit_register(); /* this can init any time */
 
-#ifndef WITH_PYTHON_MODULE
 	py_tstate = PyGILState_GetThisThreadState();
 	PyEval_ReleaseThread(py_tstate);
 #endif
@@ -288,7 +289,9 @@
 
 	bpy_intern_string_exit();
 
+#ifndef WITH_PYTHON_MODULE
 	BPY_atexit_unregister(); /* without this we get recursive calls to WM_exit */
+#endif
 
 	Py_Finalize();
 	



More information about the Bf-blender-cvs mailing list