From fb0ce93a9c949ec9c56a56769ee0c1acd3030f22 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 7 Nov 2007 10:10:30 +0000 Subject: [PATCH] PAL16774 (Crash after display of many groups) throw if there are errors in buildPrs() --- src/OBJECT/SMESH_Object.cxx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 1fa0b34f6..9bdc652a0 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,18 @@ 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" ); -- 2.39.2