From d09518158d3d7707fcea1059464fc2d1c8b308dd Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 22 Nov 2005 09:14:04 +0000 Subject: [PATCH] Fix for Bug GVIEW10561 SIGSEGV detected while loading zzzz121b.med file Miss uncorrect fields. Provide right calculation of number of the Gauss Points. --- src/CONVERTOR/VISU_MedConvertor.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index c4dae4ce..953b0c43 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -642,12 +642,12 @@ namespace std::string aFieldName = aFieldInfo->GetName(); MED::TGeom2Size aGeom2Size; - MED::EEntiteMaillage aMEntity = MED::EEntiteMaillage(-1); + MED::EEntiteMaillage aMEntity; TInt aNbTimeStamps = theMEDWrapper->GetNbTimeStamps(aFieldInfo, theEntityInfo, aMEntity, aGeom2Size); - if(int(aMEntity) < 0 || aNbTimeStamps < 1) + if(aNbTimeStamps < 1) continue; TEntity aVEntity = MEDEntityToVTK(aMEntity); @@ -1139,6 +1139,8 @@ VISU_MedConvertor aMKey2Profile, aKey2Gauss); + const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss(); + const MED::TTimeStampVal& aTimeStampValRef = aTimeStampVal; const MED::TGeom2Value& aGeom2Value = aTimeStampValRef.myGeom2Value; @@ -1150,6 +1152,10 @@ VISU_MedConvertor TInt aNbElem = aMMeshValue.myNbElem; TInt aNbGauss = aMMeshValue.myNbGauss; + MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom); + if(aGaussIter == aGeom2Gauss.end()) + aNbGauss = 1; + INITMSG(MYDEBUG, "- aMGeom = "<