From: Roman NIKOLAEV Date: Thu, 25 Jun 2020 10:25:16 +0000 (+0300) Subject: #19732 [CEA] SIGSEGV with synchronized OCC and VTK views X-Git-Tag: V9_5_0rc3^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4522feceda4d1c8ee6664a452b7315dcf159c2bd;p=modules%2Fgui.git #19732 [CEA] SIGSEGV with synchronized OCC and VTK views --- diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index da790e081..dfe13c2bc 100644 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -97,6 +97,7 @@ #include #include +#include #include "utilities.h" @@ -3662,15 +3663,19 @@ void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView ) aProps.getPosition( aPosition[0], aPosition[1], aPosition[2] ); aProps.getViewUp( anUpDir[0], anUpDir[1], anUpDir[2] ); aProps.getAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] ); - - aDestView->SetAt( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] ); - aDestView->SetEye( aPosition[0], aPosition[1], aPosition[2] ); - aDestView->SetUp( anUpDir[0], anUpDir[1], anUpDir[2] ); - aDestView->Camera()->SetScale( aProps.getMappingScale() ); - - getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] ); - aDestView->SetImmediateUpdate( Standard_True ); - aDestView->Redraw(); + + try { + aDestView->SetAt( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] ); + aDestView->SetEye( aPosition[0], aPosition[1], aPosition[2] ); + aDestView->SetUp( anUpDir[0], anUpDir[1], anUpDir[2] ); + aDestView->Camera()->SetScale( aProps.getMappingScale() ); + + getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] ); + aDestView->SetImmediateUpdate( Standard_True ); + aDestView->Redraw(); + } + catch (Standard_Failure) { + } blockSignals( blocked ); }