[Paraview] Problem with custom time-aware reader

Karl König kkoenig11 at web.de
Fri Sep 4 02:24:40 EDT 2009


Hi Ken,

Thanks again for your input.

> You have the basic idea.  The seg fault is probably happening because
> the destructor of you class is trying to free the pointer you set to it,
> which is probably actually pointing to some spot on the stack.
> 
> You are probably not seeing this mapping/lookup in the VTK IO classes
> because you are looking at classes that do not directly support time
> (such as the legacy readers and XML readers).  Those readers read
> exactly one file with one time step in it.  ParaView has a magic meta
> reader called a FileSeriesReader that takes a real reader and a
> collection of files and multiplexes the files to the reader based on the
> time.
> 
> In retrospect, this is probably an easier way to go (assuming your final
> reader is a file series like this).  Documentation on using the
> FileSeriesReader is on the Wiki at
> 
>     http://www.paraview.org/Wiki/Restarted_Simulation_Readers#Customized_Restart_Reader

I've been aware of that page. In fact, FooReader.xml and
FooReaderGUI.xml of the tarball I posted already did make use of the
FileSeriesReader. Together with calling
  outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), ...)
  outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), ...)
in RequestInformation it is responsible for inspecting all files of the
series between selecting them in the file open dialog and appearing of
the Apply button.

Anyway, I'll try to use again the mapping time step value -> file name
and iron out the segfault on deletion of the reader object.

I'll post the solution in case I can work it out and someone is interested.

Karl



More information about the ParaView mailing list