From: eap Date: Wed, 4 Dec 2013 13:26:42 +0000 (+0000) Subject: 22431: EDF SMESH Regression: segmentation violation with BLSURF X-Git-Tag: V7_3_0b1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fbf4b5afe907be5ac63c0260663f17c34d3672f0;p=plugins%2Fblsurfplugin.git 22431: EDF SMESH Regression: segmentation violation with BLSURF + gstate = PyGILState_Ensure(); --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index e89d864..4cfa4f0 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -2407,6 +2407,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, if (theSizeMapStr.find(bad_end) == (theSizeMapStr.size()-bad_end.size()-1)) continue; // Expr To Python function, verification is performed at validation in GUI + gstate = PyGILState_Ensure(); PyObject * obj = NULL; obj= PyRun_String(theSizeMapStr.c_str(), Py_file_input, main_dict, NULL); Py_DECREF(obj); @@ -2414,6 +2415,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, func = PyObject_GetAttrString(main_mod, "f"); VertexId2PythonSmp[*ip]=func; VertexId2SizeMap.erase(vertexKey); // do not erase if using a vector + PyGILState_Release(gstate); } } }