Hi,<br><br>I didn't have any problems using a vtkSmartPointer for vtkCPProcessor. I'd have to see your full code to know for sure but my guess is that _spProcessor is a pointer to a vtkCPProcessor and not a vtkSmartPointer<vtkCPProcessor>. When I make that mistake I get a crash.<br>
<br>Regards,<br>Andy<br><br><div class="gmail_quote">On Sat, Aug 3, 2013 at 4:41 AM, HOUSSEN Franck <span dir="ltr"><<a href="mailto:Franck.Houssen@cea.fr" target="_blank">Franck.Houssen@cea.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hello,<br>
<br>
I try to understand if (and how) I can use Catalyst for my need (in-situ visualisation). I started with :
<a href="http://paraview.org/Wiki/ParaView/Catalyst/Overview" target="_blank">http://paraview.org/Wiki/ParaView/Catalyst/Overview</a><br>
<br>
To code the adaptor, you need to handle VTK objects. When using VTK, I generally prefer to use smart pointers (avoid looking for leaks).<br>
Here is my code (this is the only call / use of VTK object in the all code)<br>
paraviewAdaptor::paraviewAdaptor ()<br>
{<br>
_spProcessor = vtkSmartPointer<vtkCPProcessor>::New ();<br>
// _spProcessor -> Initialize (); // Crash if uncommented ?!<br>
}<br>
Compilation is OK, but at run time I get a crash with this error message :<br>
*** The MPI_Comm_free() function was called after MPI_FINALIZE was invoked.<br>
*** This is disallowed by the MPI standard.<br>
<br>
So I tried to use pointers instead of smartpointers :<br>
paraviewAdaptor::paraviewAdaptor ()<br>
{<br>
_pProcessor = vtkCPProcessor::New ();<br>
_pProcessor -> Initialize (); // Don't crash ?!<br>
}<br>
And I don't get any crash anymore ?!....<br>
<br>
Why is that ? How can I use vtkSmartPointers ?<br>
<br>
Note : I use ParaView-v4.0.1-source.tgz and I run on Ubuntu 12.04<br>
<br>
Thanks,<br>
<br>
FH<br>
</div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>