PAL16774 (Crash after display of many groups)

throw if there are errors in buildPrs()
This commit is contained in:
eap 2007-11-07 10:10:30 +00:00
parent 0a33c4aa98
commit fb0ce93a9c

View File

@ -199,10 +199,8 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
//================================================================================= //=================================================================================
void SMESH_VisualObjDef::buildPrs() void SMESH_VisualObjDef::buildPrs()
{ {
// PAL16631(crash after a mesh computation that failed because of lack of memory): try
// Catch exceptions upper by stack {
// try
// {
mySMDS2VTKNodes.clear(); mySMDS2VTKNodes.clear();
myVTK2SMDSNodes.clear(); myVTK2SMDSNodes.clear();
mySMDS2VTKElems.clear(); mySMDS2VTKElems.clear();
@ -212,15 +210,18 @@ void SMESH_VisualObjDef::buildPrs()
buildNodePrs(); buildNodePrs();
else else
buildElemPrs(); buildElemPrs();
// } }
// catch( const std::exception& exc ) catch(...)
// { {
// INFOS("Follow exception was cought:\n\t"<<exc.what()); mySMDS2VTKNodes.clear();
// } myVTK2SMDSNodes.clear();
// catch(...) mySMDS2VTKElems.clear();
// { myVTK2SMDSElems.clear();
// INFOS("Unknown exception was cought !!!");
// } myGrid->SetPoints( 0 );
myGrid->SetCells( 0, 0, 0 );
throw;
}
if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() ); if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
if( MYDEBUGWITHFILES ) SMESH::WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" ); if( MYDEBUGWITHFILES ) SMESH::WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );