[Paraview-developers] Problem with plugins build from an inherited class

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue May 6 14:27:37 EDT 2014


Yes vtkITKImageFilter sounds like the class being wrapped twice. Is
vtkITKImageFilter.cxx added to both the plugins in
ADD_PARAVIEW_PLUGIN() call?

On Tue, May 6, 2014 at 11:45 AM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu> wrote:
> I am not sure if this is the wrapped class that you mentioned, but I checked
> the code,
>
> within the CMake of the base class (vtkITKImageFilter), there is
>
> VTK_WRAP_ClientServer("ITKImageFilter"
>   ParaViewITKPluginsWrappedSrcs "${ParaViewITKPluginsCommonSrcs}"
> )
>
> and in the base class' header, there are a bunch of //BTX and //ETX securing
> ITK declarations.
>
> Within the pluings' headers, there are also a bunch of //BTX and //ETX
> surrounding ITK code.
>
> I tried disabling them all above, but still get the same error.
>
>
> One thing I noticed is that in Visual Studio under the projects of both
> plugins, there is a vtkITKImageFilterClientServer.cxx created by ParaView.
> Could this be the duplicate copy of class?
>
>
> On Tue, May 6, 2014 at 8:58 AM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>>
>> Is it possible that both of the plugins have some wrapped class that
>> is duplicated in the two?
>>
>> On Mon, May 5, 2014 at 1:32 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
>> wrote:
>> > 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
>> >
>> > Unhandled exception at 0x000007feeb86275d (vtkClientServer-pv4.1.dll) in
>> > ImageSurfer2.exe: 0xC0000005: Access violation reading location
>> > 0x0000000000000000.
>> >
>> >
>> > The call stack:
>> >
>> >   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 C++
>> >
>> >>
>> >>
>> >> 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 C++
>> >
>> >   Hessian3DToVesselnessMeasureImageFilter.dll!000007feed34e8c2()
>> >
>> >   [Frames below may be incorrect and/or missing, no symbols loaded for
>> > Hessian3DToVesselnessMeasureImageFilter.dll]
>> >
>> >   000000000480f170()
>> >
>> >   Hessian3DToVesselnessMeasureImageFilter.dll!000007feed4920d0()
>> >
>> >   Hessian3DToVesselnessMeasureImageFilter.dll!000007feed301cfd()
>> >
>> >
>> >
>> > Here is my class hierarchy:
>> >
>> >
>> > vtkITKImageFilter  -> class inherits from vtkImageAlgorithm. Use
>> > vtkImageExport, itk::VTKImageImport, itk::VTKImageExport, and
>> > vtkImageImport
>> > inside to convert between VTK and ITK.
>> >
>> >
>> > MyITKFilter -> my ITK plugin inheriting from vtkITKImageFilter.
>> >
>> >
>> >
>> > I include source code from both classes in CMake:
>> >
>> >
>> > ADD_PARAVIEW_PLUGIN(${PLUGIN} 1.0
>> >
>> >   SERVER_MANAGER_XML ${XML}
>> >
>> >   SERVER_MANAGER_SOURCES vtkHessian3DToVesselnessMeasureImageFilter.cxx
>> > ../Common/vtkITKImageFilter.cxx
>> >
>> >   SOURCES ${XML}
>> >
>> > )
>> >
>> >
>> > and link the plugin with ITK
>> >
>> >
>> > TARGET_LINK_LIBRARIES(${PLUGIN} ${ITK_LIBRARIES})
>> >
>> >
>> > ITK was built in static.
>> >
>> >
>> > Any idea what might cause the trouble?
>> >
>> >
>> >
>> > Thanks,
>> >
>> > Joe
>> >
>> >
>> > _______________________________________________
>> > Paraview-developers mailing list
>> > Paraview-developers at paraview.org
>> > http://public.kitware.com/mailman/listinfo/paraview-developers
>> >
>
>


More information about the Paraview-developers mailing list