From: eap Date: Wed, 7 Nov 2007 10:10:45 +0000 (+0000) Subject: PAL16774 (Crash after display of many groups) X-Git-Tag: V3_2_9rc1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a1388f1b6ed35508bc35d6e3f987a7d8fd27032d;p=modules%2Fsmesh.git PAL16774 (Crash after display of many groups) throw if there are errors in buildPrs() --- diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 0dbbc68af..748b4ffe4 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -199,10 +199,8 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints ) //================================================================================= void SMESH_VisualObjDef::buildPrs() { - // PAL16631(crash after a mesh computation that failed because of lack of memory): - // Catch exceptions upper by stack -// try -// { + try + { mySMDS2VTKNodes.clear(); myVTK2SMDSNodes.clear(); mySMDS2VTKElems.clear(); @@ -212,15 +210,20 @@ void SMESH_VisualObjDef::buildPrs() buildNodePrs(); else buildElemPrs(); -// } -// catch( const std::exception& exc ) -// { -// INFOS("Follow exception was cought:\n\t"<SetPoints( 0 ); + myGrid->SetCells( 0, 0, 0 ); + throw; + } if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<GetNumberOfCells() ); if( MYDEBUGWITHFILES ) SMESH::WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );