From a1388f1b6ed35508bc35d6e3f987a7d8fd27032d Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 7 Nov 2007 10:10:45 +0000 Subject: [PATCH] PAL16774 (Crash after display of many groups) throw if there are errors in buildPrs() --- src/OBJECT/SMESH_Object.cxx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) 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" ); -- 2.39.2