Hello all,<div><br></div><div>I&#39;m developing a ParaView plugin that modifies the camera position with data coming from a interaction device. I&#39;m using C++ and Linux 64 bit. I have tested it with the build in server and it works without a hitch. However, when I connect the client to a server used for visualizing data in a tiled display, I run on some issues, namely a Segmentation Fault :(. </div>
<div><br></div><div>When I connect my client to the remote server, I load my plugin and connect it to the server used for reading the data from the interaction device. It works well if I use a build-in source for test (like a cylinder), and nothing wrong happen. However, If I try to load a ParaView state of a more complex model, the client collapses (Almost every time, sometimes it works just fine and I can use the interaction device with the tile display). When I run gdb, It says that the segmentation fault is triggered by a call to vtkCamera::Roll or some other method of vtkCamera. Since I&#39;m doing this at the constructor of my plugin:</div>
<div><br></div><div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  pqView * theView = pqActiveView::instance().current();</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  vtkSMRenderViewProxy* myProxy = (vtkSMRenderViewProxy*)theView-&gt;getViewProxy();</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;"> *theCamera = myProxy-&gt;GetActiveCamera();</span></div><div><br></div><div>and theCamera is a member of my plugin class, I thought that maybe the pqView is changing when I load the state, and the vtkCamera address is no longer valid. Obviously, I would get a Segmentation Fault.</div>
<div><br></div><div>Since It seems like pqView changes when I load a state, then I changed my code in order to obtain the new pqView each time my method that changes the camera position is called (It is a SLOT, by the way). So I changed it like this:</div>
<div><br></div><div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">void myClass::changeCameraPosition(const float  roll, const float elevation, const float  azimuth)</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">{</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  pqView * theView = pqActiveView::instance().current();<br>
</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  vtkSMRenderViewProxy* myProxy = (vtkSMRenderViewProxy*)theView-&gt;getViewProxy();</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  vtkCamera *newCamera = myProxy-&gt;GetActiveCamera();</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  cout &lt;&lt; &quot;AddNewCam &quot;&lt;&lt;newCamera&lt;&lt;&quot; endNC&quot;&lt;&lt;endl;</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  newCamera-&gt;Roll(roll);</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  newCamera-&gt;Elevation(elevation);</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  newCamera-&gt;Azimuth(azimuth);</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">  newCamera-&gt;OrthogonalizeViewUp();  </span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">}</span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;; font-size: 12px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 12px;">As you can see, I have added a cout in order to show the new address of theCamera. However, when I tried this solution, the client would die even before printing the new camera address.</span></div>
<div><span class="Apple-style-span" style="font-size: 12px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 12px;">So, I wanted to ask you, What I&#39;m doing wrong? Is there something different with pqView in a local setting opposed to a remote setting? And, more importantly, why it works sometimes? I would expect a bad behaving code to break every single time, not working in isolated occasions.</span></div>
<div><span class="Apple-style-span" style="font-size: 12px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 12px;">Thanks a lot in advance for your help.</span></div><div><span class="Apple-style-span" style="font-size: 12px;"><br>
</span></div><div><span class="Apple-style-span" style="font-size: 12px;">Best Regards,</span></div><div><span class="Apple-style-span" style="font-size: 12px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 12px;">AndrĂ©s Padilla</span></div>
<div><span class="Apple-style-span" style="font-size: 12px;">Universidad de los Andes, Graduate Student</span></div></div></div>