[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20100] trunk/blender: BGE Python owned proxies had a problem being decref'd twice, this would crash on freeing KX_Vertex/ Poly Proxy types when python was compiled with debug options enabled.
Campbell Barton
ideasman42 at gmail.com
Fri May 8 00:06:27 CEST 2009
Revision: 20100
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20100
Author: campbellbarton
Date: 2009-05-08 00:06:27 +0200 (Fri, 08 May 2009)
Log Message:
-----------
BGE Python owned proxies had a problem being decref'd twice, this would crash on freeing KX_Vertex/Poly Proxy types when python was compiled with debug options enabled.
add_mesh_torus.py wasnt tested from update, will go through all edited scripts and test :\
Modified Paths:
--------------
trunk/blender/release/scripts/add_mesh_torus.py
trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
Modified: trunk/blender/release/scripts/add_mesh_torus.py
===================================================================
--- trunk/blender/release/scripts/add_mesh_torus.py 2009-05-07 20:00:09 UTC (rev 20099)
+++ trunk/blender/release/scripts/add_mesh_torus.py 2009-05-07 22:06:27 UTC (rev 20100)
@@ -62,7 +62,7 @@
BPyAddMesh.add_mesh_simple('Torus', verts, [], faces)
-if math:
+if cos and sin and pi:
main()
else:
Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-05-07 20:00:09 UTC (rev 20099)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-05-07 22:06:27 UTC (rev 20100)
@@ -95,6 +95,7 @@
PyObjectPlus *self_plus= BGE_PROXY_REF(self);
if(self_plus) {
if(BGE_PROXY_PYOWNS(self)) { /* Does python own this?, then delete it */
+ self_plus->m_proxy = NULL; /* Need this to stop ~PyObjectPlus from decrefing m_proxy otherwise its decref'd twice and py-debug crashes */
delete self_plus;
}
More information about the Bf-blender-cvs
mailing list