Hello,
Thanks for the info. I tested with a V2 script (loading the pipeline with vtkCPPythonScriptV2Pipeline
) but have an issue I do not have with V1 scripts.
I get a an exception (SIGSEGV) under vtkCPProcessor.cxx (line 234 as of commit 86fbe2b215b1cba6ca0d223635741df7d725bc21)
│ 230 int doCoProcessing = 0; │
│ 231 for (vtkCPProcessorInternals::PipelineListIterator iter = this->Internal->Pipelines.begin(); │
│ 232 iter != this->Internal->Pipelines.end(); iter++) │
│ 233 { │
│ >234 if (iter->GetPointer()->RequestDataDescription(dataDescription)) │
│ 235 { │
│ 236 doCoProcessing = 1; │
│ 237 } │
│ 238 } │
│ 239 return doCoProcessing;
Where under gdb,
call dataDescription->GetNumberOfInputDescriptions()
returns 1, but iter seems wrong:
(gdb) p iter
$23 = {<vtkSmartPointerBase> = {Object = 0x555555fd2b00}, <No data fields>}
I guess the next step is to check what these values are in a working (V1 pipeline) script in my application.
If I check the dataDescription object, I have similar contents both for the V1 and V2 pipelines (here from V2:
p *((vtkCPInputDataDescription *) 0x555556fde270)
$27 = {<vtkObject> = {<vtkObjectBase> = {
_vptr.vtkObjectBase = 0x7ffff4d75720 <vtable for vtkCPInputDataDescription+16>,
ReferenceCount = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>},
WeakPointers = 0x0, IsInMemkind = false}, Debug = false, MTime = {ModifiedTime = 286509},
SubjectHelper = 0x0}, AllFields = false, GenerateMesh = false, Grid = 0x0, TemporalCache = 0x0,
Internals = 0x55555725b360, WholeExtent = {0, -1, 0, -1, 0, -1}}
Running under Valgrind, I get a bit more information:
==926622== Invalid read of size 8
==926622== at 0x7AA7E17: vtkCPProcessor::RequestDataDescription(vtkCPDataDescription*) (vtkCPProcessor.cxx:234)
==926622== by 0x4966CE0: fvm_to_catalyst_flush (fvm_to_catalyst.cxx:1876)
==926622== by 0x494401B: fvm_writer_flush (fvm_writer.c:1562)
==926622== by 0x4B2933B: cs_post_time_step_end (cs_post.c:6934)
==926622== by 0x4B2941B: cs_post_write_vars (cs_post.c:6980)
==926622== by 0x4B2ACB0: pstvar_ (cs_post_default.c:398)
==926622== by 0x4986757: caltri_ (caltri.f90:1096)
==926622== by 0x484D0C7: _run (cs_solver.c:440)
==926622== by 0x484D3B5: main (cs_solver.c:677)
==926622== Address 0x203d6860 is 0 bytes inside a block of size 64 free'd
==926622== at 0x483BEAB: operator delete(void*) (vg_replace_malloc.c:584)
==926622== by 0x49673D1: vtkNew<vtkCPPythonScriptV2Pipeline>::Reset() (vtkNew.h:127)
==926622== by 0x49672A1: vtkNew<vtkCPPythonScriptV2Pipeline>::~vtkNew() (vtkNew.h:119)
==926622== by 0x4963A97: _add_v2_pipeline(char const*) (fvm_to_catalyst.cxx:345)
==926622== by 0x4963BDE: _add_script(char const*) (fvm_to_catalyst.cxx:423)
==926622== by 0x4963F52: _add_dir_scripts(char const*) (fvm_to_catalyst.cxx:496)
==926622== by 0x49662C4: fvm_to_catalyst_init_writer (fvm_to_catalyst.cxx:1530)
==926622== by 0x494298A: _format_writer_init (fvm_writer.c:715)
==926622== by 0x494376F: fvm_writer_init (fvm_writer.c:1211)
==926622== by 0x4B1DDA8: _init_writer (cs_post.c:590)
==926622== by 0x4B20D28: _cs_post_write_mesh (cs_post.c:2207)
==926622== by 0x4B2696C: cs_post_write_meshes (cs_post.c:5454)
==926622== Block was alloc'd at
==926622== at 0x483ADEF: operator new(unsigned long) (vg_replace_malloc.c:342)
==926622== by 0x7A8F2C0: vtkCPPythonScriptV2Pipeline::New() (vtkCPPythonScriptV2Pipeline.cxx:21)
==926622== by 0x496727A: vtkNew<vtkCPPythonScriptV2Pipeline>::vtkNew() (vtkNew.h:89)
==926622== by 0x49638CC: _add_v2_pipeline(char const*) (fvm_to_catalyst.cxx:345)
==926622== by 0x4963BDE: _add_script(char const*) (fvm_to_catalyst.cxx:423)
==926622== by 0x4963F52: _add_dir_scripts(char const*) (fvm_to_catalyst.cxx:496)
==926622== by 0x49662C4: fvm_to_catalyst_init_writer (fvm_to_catalyst.cxx:1530)
==926622== by 0x494298A: _format_writer_init (fvm_writer.c:715)
==926622== by 0x494376F: fvm_writer_init (fvm_writer.c:1211)
==926622== by 0x4B1DDA8: _init_writer (cs_post.c:590)
==926622== by 0x4B20D28: _cs_post_write_mesh (cs_post.c:2207)
==926622== by 0x4B2696C: cs_post_write_meshes (cs_post.c:5454)
Note thet with the V2 pipeline, under gdb, I often get messages similar to this:
warning: Corrupted shared library list: 0x5555556a3260 != 0x7fffe23c48a0
Which I did not observe with the V1 pipeline (same build, but I ran the V2 pipeline more often under the debugger). To run under gdb, I linked ParaView statically. I don’t know if this might be the root cause of the issue, but seeing that there is a specific V2 pipeline path in the Valgrinf trace, I don’t know if the issue has more chances of hiding in the build process, or in the source code…
Any help on this is welcome.
Best regards,
Yvan