From fbf4b5afe907be5ac63c0260663f17c34d3672f0 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 4 Dec 2013 13:26:42 +0000 Subject: [PATCH] 22431: EDF SMESH Regression: segmentation violation with BLSURF + gstate = PyGILState_Ensure(); --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 2 ++ 1 file changed, 2 insertions(+) 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); } } } -- 2.39.2