[Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Bogdan Daqui Herrera
Hello all, I am attempting to write some code in c++ which uses the vtkPVDReader from the paraview library to read a series of vtm files. However I am encountering some problems and I am not sure whether there is something I am missing or whether this could be a bug. I am trying to use the read

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Sebastien Jourdain
Hi Bogdan, here are some issue in your code: vtkSmartPointer pReader = vtkPVDReader::New(); // <== Memory LEAK // Should be either // vtkNew pReader; // vtkSmartPointer pReader = vtkSmartPointer::New() Then here on a "NULL" object you try to call a method. vtkMultiBlockDataSet* pMultiBlockData

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Bogdan Daqui Herrera
Hi Seb, Thanks for the quick reply. Yes the project is managed with CMake. I have not however been able to find the relevant posts by Marcus (in the users list). Is that in the users or developers mailing list? It does sound like it could be a problem with some initialization, as you can see be

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Sebastien Jourdain
If you provide the stack trace, that may be helpful. Seb On Thu, Oct 23, 2014 at 10:36 AM, Bogdan Daqui Herrera wrote: > Hi Seb, > > Thanks for the quick reply. Yes the project is managed with CMake. I have > not however been able to find the relevant posts by Marcus (in the users > list). Is >

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Bogdan Daqui Herrera
Certainly. I should mention, I am using a pre-compiled version of Paraview 4.1 bundled with Salome (Ubuntu package). Here it is (using pReader->SetForceOutputTypeToMultiBlock(1)): ERROR: In /misc/dn47/SALOME/PRODUCTS/7x/opt/Ubuntu.13.10.64/7.4.0/tmp/ParaView-4.1.0_SRC/ParaViewCore/VTKExtensions/

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-23 Thread Sebastien Jourdain
Thanks Bogdan, that's not helping me but someone else might have some idea. Seb On Thu, Oct 23, 2014 at 12:19 PM, Bogdan Daqui Herrera wrote: > Certainly. I should mention, I am using a pre-compiled version of Paraview > 4.1 bundled with Salome (Ubuntu package). > > Here it is (using pReader->

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-24 Thread Burlen Loring
Hi Bogdan, You are writing a stand alone C++ app right? Are you setting up to run the composite data pipeline as in the following example? 100 vtkCompositeDataPipeline* cexec=vtkCompositeDataPipeline::New(); 101 vtkAlgorithm::SetDefaultExecutivePrototype(cexec); 102 cexec->Delete(); Bur

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-27 Thread Bogdan Daqui Herrera
Hi Burlen, Yes, it is a stand-alone C++ application, which makes use of VTK and Paraview as libraries, linking against them and calling functionality to interpret the data. I am not setting up any pipeline (as of now). Is this from the TestExodusTime or TestTemporalFractal examples. I will try

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-27 Thread Burlen Loring
Unless something's changed in the pipeline recently that I'm unaware of, when dealing with multiblock data you still need to force the composite data pipeline first. that may or or may not be the cause of your segfault, but you need to do it. On 10/27/2014 03:56 AM, Bogdan Daqui Herrera wrote:

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-27 Thread Utkarsh Ayachit
Bogdan, The deal is this: the vtkPVDReader is designed for ParaView, it uses some of the core client-server infrastructure in ParaView. Thus, you can't use it directly is a VTK-based C++ executable without initializing ParaView environment. Initializing ParaView environment is not too complicated.

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-27 Thread Bogdan Daqui Herrera
Burlen, Uktarsh, Thanks for the clarification. I will give this a try and write back. This might actually also help me with another problem I am having at setting the timestep for which I want to fetch cell/point data. This also has to be done from the pipeline object, right? Kind Regards, Bog

Re: [Paraview] Segmentation Fault when using the vtkPVDReader

2014-10-28 Thread Bogdan Daqui Herrera
Hi Uktarsh, Burlen, The PVD reader is finally working, thanks for the suggestions. Initializing the environment before using the PVDReader is what did the trick. Should it be useful to somebody else, you can use something akin to the following for initialization: static vtkSmartPointer