Hi, When loading a VR state in the VRPlugin, paraview often crashes if there is a VRInteractorStyle defined. The reason for this is that if the proxy/proxyName doesn't match anything in the current state, the style cannot be configured. If the style is then added to the VRQueueHandler, ParaView crashes.
The attached patch fixes the crash. Cheers, Johannes
From 2617729770175e6375ad9704d808229ed79eb6dd Mon Sep 17 00:00:00 2001 From: Johannes Zarl <[email protected]> Date: Wed, 7 Aug 2013 16:53:36 +0200 Subject: [PATCH] Fix crash when VRPlugin can't get interactor style. Don't add a VRInteractorStyle when its configure method returns false. --- Plugins/VR/pqVRQueueHandler.cxx | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Plugins/VR/pqVRQueueHandler.cxx b/Plugins/VR/pqVRQueueHandler.cxx index 182de91..35c9f9e 100644 --- a/Plugins/VR/pqVRQueueHandler.cxx +++ b/Plugins/VR/pqVRQueueHandler.cxx @@ -238,8 +238,14 @@ void pqVRQueueHandler::configureStyles(vtkPVXMLElement* xml, factory->NewInteractorStyleFromClassName(class_name); if (style) { - style->Configure(child, locator); - this->add(style); + if (style->Configure(child, locator)) + { + this->add(style); + } + else + { + style->Delete(); + } } else { -- 1.6.0.2
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
