From ab79c42c1cd53f1ba4e8379cc8b10d0c22ebb428 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 23 May 2007 10:49:36 +0000 Subject: [PATCH] Crash on TimeStamps.med / pression - IsoSurfaces --- src/VISU_I/VISU_ColoredPrs3dCache_i.cc | 69 ++++++++++++++------------ 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc index d68bebc1..2485fe3b 100644 --- a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc @@ -619,41 +619,40 @@ VISU::ColoredPrs3dCache_i VISU::View3D_ptr theView3D) { if(MYDEBUG) cout << "VISU::ColoredPrs3dCache_i::UpdateLastVisitedPrs" << endl; - TPrs3dPtr aLastVisitedPrs3d = GetLastVisitedPrs(theHolder); - TLastVisitedPrsList& aLastVisitedPrsList = GetLastVisitedPrsList(theHolder); TPrs3dPtr aPrs3d; - bool anIsCheckPossible = GetMemoryMode() == VISU::ColoredPrs3dCache::LIMITED; - std::string aHolderEntry = theHolder->GetEntry(); - VISU::VISUType aPrsType = theHolder->GetPrsType(); - CORBA::Float aRequiredMemory = 0.0; - if(aPrs3d = FindPrsByInput(aLastVisitedPrsList, theInput)){ - aLastVisitedPrsList.push_front(aPrs3d); - if(MYDEBUG) cout << "FindPrsByInput " << aPrs3d << endl; - }else if(anIsCheckPossible && IsPossible(aPrsType, theInput, aRequiredMemory, aHolderEntry)){ - if( aRequiredMemory > 1.0 / VTK_LARGE_FLOAT ) - ClearMemory(aRequiredMemory, aHolderEntry); - aPrs3d = CreatePrs(aPrsType, theInput, theHolder); - if(MYDEBUG) cout << "Created " << aPrs3d << endl; - }else{ - aPrs3d = aLastVisitedPrsList.back(); - aPrs3d->SetResultObject(theInput.myResult); - aPrs3d->SetMeshName(theInput.myMeshName); - aPrs3d->SetEntity(theInput.myEntity); - aPrs3d->SetFieldName(theInput.myFieldName); - aPrs3d->SetTimeStampNumber(theInput.myTimeStampNumber); - aLastVisitedPrsList.pop_back(); - aLastVisitedPrsList.push_front(aPrs3d); - if(MYDEBUG) cout << "Move only " << aPrs3d << endl; - } - //if(MYDEBUG) PrintCache(); - - try { + try{ + TPrs3dPtr aLastVisitedPrs3d = GetLastVisitedPrs(theHolder); + TLastVisitedPrsList& aLastVisitedPrsList = GetLastVisitedPrsList(theHolder); + bool anIsCheckPossible = GetMemoryMode() == VISU::ColoredPrs3dCache::LIMITED; + std::string aHolderEntry = theHolder->GetEntry(); + VISU::VISUType aPrsType = theHolder->GetPrsType(); + CORBA::Float aRequiredMemory = 0.0; + if(aPrs3d = FindPrsByInput(aLastVisitedPrsList, theInput)){ + aLastVisitedPrsList.push_front(aPrs3d); + if(MYDEBUG) cout << "FindPrsByInput " << aPrs3d << endl; + }else if(anIsCheckPossible && IsPossible(aPrsType, theInput, aRequiredMemory, aHolderEntry)){ + if( aRequiredMemory > 1.0 / VTK_LARGE_FLOAT ) + ClearMemory(aRequiredMemory, aHolderEntry); + aPrs3d = CreatePrs(aPrsType, theInput, theHolder); + if(MYDEBUG) cout << "Created " << aPrs3d << endl; + }else{ + aPrs3d = aLastVisitedPrsList.back(); + aPrs3d->SetResultObject(theInput.myResult); + aPrs3d->SetMeshName(theInput.myMeshName); + aPrs3d->SetEntity(theInput.myEntity); + aPrs3d->SetFieldName(theInput.myFieldName); + aPrs3d->SetTimeStampNumber(theInput.myTimeStampNumber); + aLastVisitedPrsList.pop_back(); + aLastVisitedPrsList.push_front(aPrs3d); + if(MYDEBUG) cout << "Move only " << aPrs3d << endl; + } + //if(MYDEBUG) PrintCache(); + aPrs3d->SameAs(thePrs); - } catch (...) { - return false; - } - aPrs3d->UpdateActors(); - if(!CORBA::is_nil(theView3D)){ + aPrs3d->UpdateActors(); + if(CORBA::is_nil(theView3D)) + return false; + PortableServer::ServantBase_var aServant = GetServant(theView3D); if(VISU::View3D_i* aView3d = dynamic_cast(aServant.in())){ if(SUIT_ViewWindow* aView = aView3d->GetViewWindow()){ @@ -700,6 +699,10 @@ VISU::ColoredPrs3dCache_i } } } + }catch(std::exception& exc){ + INFOS("Follow exception was occured :\n"<