<div dir="ltr">I am having trouble loading my custom plugins, which have an internal ITK pipeline. Everything works fine if I only load one of them. As soon as I load a second one, the program crashes. The error message I get from debug mode is<div>
<br></div><div>Unhandled exception at 0x000007feeb86275d (vtkClientServer-pv4.1.dll) in ImageSurfer2.exe: 0xC0000005: Access violation reading location 0x0000000000000000.<br></div><div><p style="margin:0px"><br></p><p style="margin:0px">
The call stack:</p><p style="margin:0px"> <span class="" style="white-space:pre">      </span>vtkClientServer-pv4.1.dll!std::operator<<<std::char_traits<char> >(std::basic_ostream<char,std::char_traits<char> > & _Ostr={...}, const char * _Val=0x000007feeb8aaec8)  Line 747 + 0x8 bytes<span class="" style="white-space:pre"> </span>C++</p>
<p style="margin:0px">><span class="" style="white-space:pre">     </span>vtkClientServer-pv4.1.dll!vtkClientServerInterpreter::AddNewInstanceFunction(const char * name=0x000007feed4920d0, vtkObjectBase * (void *)* f=0x000007feed301cfd, void * ctx=0x0000000000000000, void (void *)* freeFunction=0x0000000000000000)  Line 851 + 0x1b bytes<span class="" style="white-space:pre"> </span>C++</p>
<p style="margin:0px"> <span class="" style="white-space:pre">       </span>Hessian3DToVesselnessMeasureImageFilter.dll!000007feed34e8c2() <span class="" style="white-space:pre">   </span></p><p style="margin:0px"> <span class="" style="white-space:pre">        </span>[Frames below may be incorrect and/or missing, no symbols loaded for Hessian3DToVesselnessMeasureImageFilter.dll]<span class="" style="white-space:pre"> </span></p>
<p style="margin:0px"> <span class="" style="white-space:pre">       </span>000000000480f170()<span class="" style="white-space:pre">        </span></p><p style="margin:0px"> <span class="" style="white-space:pre">        </span>Hessian3DToVesselnessMeasureImageFilter.dll!000007feed4920d0() <span class="" style="white-space:pre">   </span></p>
<p style="margin:0px"> <span class="" style="white-space:pre">       </span>Hessian3DToVesselnessMeasureImageFilter.dll!000007feed301cfd() <span class="" style="white-space:pre">   </span></p><div><br></div><p style="margin:0px">
<br></p><p style="margin:0px">Here is my class hierarchy:</p><p style="margin:0px"><br></p><p style="margin:0px">vtkITKImageFilter  -> class inherits from vtkImageAlgorithm. Use vtkImageExport, itk::VTKImageImport, itk::VTKImageExport, and vtkImageImport inside to convert between VTK and ITK. </p>
<p style="margin:0px"><br></p><p style="margin:0px">MyITKFilter -> my ITK plugin inheriting from vtkITKImageFilter.</p><p style="margin:0px"><br></p><p style="margin:0px"><br></p><p style="margin:0px">I include source code from both classes in CMake:</p>
<p style="margin:0px"><br></p><p style="margin:0px">ADD_PARAVIEW_PLUGIN(${PLUGIN} 1.0</p><p style="margin:0px">  SERVER_MANAGER_XML ${XML}</p><p style="margin:0px">  SERVER_MANAGER_SOURCES vtkHessian3DToVesselnessMeasureImageFilter.cxx ../Common/vtkITKImageFilter.cxx</p>
<p style="margin:0px">  SOURCES ${XML}</p><p style="margin:0px">)</p><p style="margin:0px"><br></p><p style="margin:0px">and link the plugin with ITK</p><p style="margin:0px"><br></p><p style="margin:0px">TARGET_LINK_LIBRARIES(${PLUGIN} ${ITK_LIBRARIES})</p>
<p style="margin:0px"><br></p><p style="margin:0px">ITK was built in static.</p><p style="margin:0px"><br></p><p style="margin:0px">Any idea what might cause the trouble?</p><p style="margin:0px"><br></p><p style="margin:0px">
<br></p><p style="margin:0px">Thanks,</p><p style="margin:0px">Joe</p></div></div>