[Paraview] Crash while loading a plugin

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Jul 10 13:47:24 EDT 2009


In the ParaView source  under Examples/Plugins/Filter there's a filter
example. Try building that. Does that work? You'll need to add the
following two lines to the start of the CMakeLists.txt in that
directory if you are directly trying to build the example on it's own.

FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

Utkarsh

On Fri, Jul 10, 2009 at 1:39 PM, Fred Fred<stan1313 at hotmail.fr> wrote:
> I tried it and same result.
> So I tried this :
>   sed s/StreamTracer/StreamPlacer/g vtkStreamTracer.{h,cxx} >
> vtkStreamPlacer.{h,cxx}
>   add #include "vtkLocalConfigure.h"
>   add class VTK_vtkLocal_EXPORT vtkStreamPlacer
> which means I just made a copy of the original vtkStreamTracer class and try
> to integrate it in ParaView.
> Same result: the new class appears in the list of filters but it clashed as
> soon as it has been selected.
>
>> Date: Fri, 10 Jul 2009 11:27:08 -0400
>> Subject: Re: [Paraview] Crash while loading a plugin
>> From: utkarsh.ayachit at kitware.com
>> To: stan1313 at hotmail.fr
>> CC: paraview at paraview.org
>>
>> I'd still CC the mailing list so others can participate and benefit
>> from this conversation.
>>
>> I am not sure why you have all the other wrapping stuff in your
>> CMakeLists.txt. Start with just the initial part.
>>
>> #===============================
>> CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
>> IF(COMMAND CMAKE_POLICY)
>> CMAKE_POLICY(SET CMP0003 NEW)
>> ENDIF(COMMAND CMAKE_POLICY)
>> PROJECT(MyClass)
>> # Find and load ParaView settings.
>> FIND_PACKAGE(ParaView REQUIRED)
>> INCLUDE(${PARAVIEW_USE_FILE})
>>
>> ADD_PARAVIEW_PLUGIN(MyClass "1.0"
>> SERVER_MANAGER_SOURCES vtkMyClass.cxx
>> SERVER_MANAGER_XML MyClass.xml)
>> #===============================
>>
>>
>> Utkarsh
>>
>>
>>
>> On Fri, Jul 10, 2009 at 11:06 AM, Fred Fred<stan1313 at hotmail.fr> wrote:
>> > Ok, I did not send it to the mailing list, I suppose this is no longer
>> > necessary.
>> >
>> > CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
>> > IF(COMMAND CMAKE_POLICY)
>> >   CMAKE_POLICY(SET CMP0003 NEW)
>> > ENDIF(COMMAND CMAKE_POLICY)
>> >
>> > # Set the project/library name here.  Classes should be declared as
>> > "class
>> > vtkLocal_EXPORT vtkFoo",
>> > # where vtkLocal is the name of the project set here.
>> > PROJECT(MyClass)
>> >
>> > # Find and load ParaView settings.
>> > FIND_PACKAGE(ParaView REQUIRED)
>> > INCLUDE(${PARAVIEW_USE_FILE})
>> > ADD_PARAVIEW_PLUGIN(MyClass "1.0"
>> >   SERVER_MANAGER_SOURCES vtkMyClass.cxx
>> >   SERVER_MANAGER_XML MyClass.xml)
>> >
>> > # Set your list of sources here.
>> > SET(MyClass_SRCS
>> >   vtkMyClass.cxx
>> > )
>> >
>> > # List the kits from VTK that are needed by this project.
>> > SET(MyClass_LIBS
>> >   vtkCommon
>> >   vtkGraphics
>> > )
>> >
>> >
>> > #-----------------------------------------------------------------------------
>> > # Most users should not need to change anything below this line.
>> >
>> > # Need to include class headers and the configuration header.
>> > INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
>> > INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
>> >
>> > # Setup output paths.
>> > SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
>> >     "Single output directory for building all libraries.")
>> > SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
>> >     "Single output directory for building all executables.")
>> > MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
>> >
>> > # Give user option of building shared or static libraries.  Default to
>> > # the choice made for VTK.
>> > OPTION(BUILD_SHARED_LIBS "Build with shared libraries."
>> >        ${VTK_BUILD_SHARED_LIBS})
>> >
>> > # Set VTKLOCAL_BUILD_SHARED_LIBS to 1 or 0 for use in creating the
>> > # configuration header.
>> > IF(BUILD_SHARED_LIBS)
>> >   SET(VTKLOCAL_BUILD_SHARED_LIBS_CONFIG 1)
>> > ELSE(BUILD_SHARED_LIBS)
>> >   SET(VTKLOCAL_BUILD_SHARED_LIBS_CONFIG 0)
>> > ENDIF(BUILD_SHARED_LIBS)
>> >
>> > IF(VTK_FOUND)
>> >   # If this is a build tree, provide an option for putting this
>> >   # project's executables and libraries in with VTK's.
>> >   IF (EXISTS ${VTK_DIR}/bin)
>> >     OPTION(USE_VTK_OUTPUT_PATHS
>> >      "Use VTK's output directory for this project's executables and
>> > libraries."
>> >      OFF)
>> >     MARK_AS_ADVANCED (USE_VTK_OUTPUT_PATHS)
>> >     IF (USE_VTK_OUTPUT_PATHS)
>> >       SET (LIBRARY_OUTPUT_PATH ${VTK_DIR}/bin)
>> >       SET (EXECUTABLE_OUTPUT_PATH ${VTK_DIR}/bin)
>> >     ENDIF (USE_VTK_OUTPUT_PATHS)
>> >   ENDIF (EXISTS ${VTK_DIR}/bin)
>> >
>> >   # Create the header to configure the classes.
>> >   CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/vtkLocalConfigure.h.in
>> >                  ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Configure.h
>> >                  @ONLY IMMEDIATE)
>> >
>> >   # Use wrapping hints for this project.
>> >   SET(VTK_WRAP_HINTS "${PROJECT_SOURCE_DIR}/hints")
>> >
>> >   # Create the instantiator for these classes.
>> >   SET(VTK_USE_INSTANTIATOR_NEW 1)
>> >   VTK_MAKE_INSTANTIATOR3("${PROJECT_NAME}Instantiator"
>> >     vtkLocalInstantiator_SRCS
>> >     "${vtkLocal_SRCS}"
>> >     "VTK_${PROJECT_NAME}_EXPORT"
>> >     ${PROJECT_BINARY_DIR}
>> >     "${PROJECT_NAME}Configure.h")
>> >
>> >   # Create the library.
>> >   ADD_LIBRARY(${PROJECT_NAME} ${vtkLocal_SRCS}
>> > ${vtkLocalInstantiator_SRCS})
>> >   TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${vtkLocal_LIBS})
>> >
>> >   # Create Tcl wrappers if VTK is wrapped in Tcl.
>> > #  IF(VTK_WRAP_TCL)
>> > #    INCLUDE(${VTK_CMAKE_DIR}/vtkWrapTcl.cmake)
>> > #    VTK_WRAP_TCL3(${PROJECT_NAME}TCL vtkLocalTCL_SRCS
>> > "${vtkLocal_SRCS}"
>> > "")
>> > #    ADD_LIBRARY(${PROJECT_NAME}TCL ${vtkLocalTCL_SRCS})
>> > #    TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL ${PROJECT_NAME})
>> > #    FOREACH(c ${vtkLocal_LIBS})
>> > #      TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL ${c}TCL)
>> > #    ENDFOREACH(c)
>> >
>> >     # Create the list of kits that are required.
>> > #    SET(VTKLOCAL_KITS "")
>> > #    FOREACH(c ${vtkLocal_LIBS})
>> > #      SET(VTKLOCAL_KITS "${VTKLOCAL_KITS} ${c}")
>> > #    ENDFOREACH(c)
>> > #    FOREACH(c ${vtkLocal_SRCS})
>> > #      GET_FILENAME_COMPONENT(VTKLOCAL_LAST_CLASS ${c} NAME_WE)
>> > #    ENDFOREACH(c)
>> >
>> > #    IF(CMAKE_CONFIGURATION_TYPES)
>> > #      FOREACH(config ${CMAKE_CONFIGURATION_TYPES})
>> > #        SET(VTKLOCAL_TCL_LIBRARY_DIR
>> > "${LIBRARY_OUTPUT_PATH}/${config}")
>> > #        CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pkgIndex.tcl.in
>> > #                       ${PROJECT_BINARY_DIR}/${config}/pkgIndex.tcl
>> > #                       @ONLY IMMEDIATE)
>> > #      ENDFOREACH(config)
>> > #    ELSE(CMAKE_CONFIGURATION_TYPES)
>> > #      SET(VTKLOCAL_TCL_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}")
>> > #      CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pkgIndex.tcl.in
>> > #                     ${PROJECT_BINARY_DIR}/pkgIndex.tcl
>> > #                     @ONLY IMMEDIATE)
>> > #    ENDIF(CMAKE_CONFIGURATION_TYPES)
>> >
>> > #  ENDIF(VTK_WRAP_TCL)
>> >
>> >   # Create Python wrappers if VTK is wrapped in Python.
>> >   IF(VTK_WRAP_PYTHON)
>> >     INCLUDE(${VTK_CMAKE_DIR}/vtkWrapPython.cmake)
>> >     VTK_WRAP_PYTHON3(${PROJECT_NAME}Python vtkLocalPYTHON_SRCS
>> > "${vtkLocal_SRCS}")
>> >     ADD_LIBRARY(${PROJECT_NAME}PythonD ${vtkLocalPYTHON_SRCS})
>> >     ADD_LIBRARY(${PROJECT_NAME}Python MODULE
>> > ${PROJECT_NAME}PythonInit.cxx)
>> >     TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${PROJECT_NAME})
>> >     FOREACH(c ${vtkLocal_LIBS})
>> >       TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${c}PythonD)
>> >     ENDFOREACH(c)
>> >     TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python ${PROJECT_NAME}PythonD)
>> >   ENDIF(VTK_WRAP_PYTHON)
>> >
>> >   # Create Java wrappers if VTK is wrapped in Java.
>> >   IF(VTK_WRAP_JAVA)
>> >     INCLUDE(${VTK_CMAKE_DIR}/vtkWrapJava.cmake)
>> >     SET(VTK_WRAP_JAVA3_INIT_DIR "${PROJECT_SOURCE_DIR}")
>> >     SET(VTK_JAVA_HOME ${PROJECT_BINARY_DIR}/java/${PROJECT_NAME})
>> >     MAKE_DIRECTORY(${VTK_JAVA_HOME})
>> >     VTK_WRAP_JAVA3(${PROJECT_NAME}Java vtkLocalJAVA_SRCS
>> > "${vtkLocal_SRCS}")
>> >     ADD_LIBRARY(${PROJECT_NAME}Java ${vtkLocalJAVA_SRCS})
>> >     TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java ${PROJECT_NAME})
>> >     FOREACH(c ${vtkLocal_LIBS})
>> >       TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java ${c}Java)
>> >     ENDFOREACH(c)
>> >   ENDIF(VTK_WRAP_JAVA)
>> >
>> >   SUBDIRS(Testing)
>> > ENDIF(VTK_FOUND)
>> >
>> >
>> >> Date: Fri, 10 Jul 2009 11:02:22 -0400
>> >> Subject: Re: [Paraview] Crash while loading a plugin
>> >> From: utkarsh.ayachit at kitware.com
>> >> To: stan1313 at hotmail.fr
>> >> CC: paraview at paraview.org
>> >>
>> >> Can you post your CMakeLists.txt?
>> >>
>> >>
>> >> Utkarsh
>> >>
>> >> On Fri, Jul 10, 2009 at 10:59 AM, Fred Fred<stan1313 at hotmail.fr> wrote:
>> >> > No, I use a standalone version of ParaView on a MacBook Pro, which I
>> >> > compiled from source.
>> >> >
>> >> >> Date: Fri, 10 Jul 2009 10:57:06 -0400
>> >> >> Subject: Re: [Paraview] Crash while loading a plugin
>> >> >> From: utkarsh.ayachit at kitware.com
>> >> >> To: stan1313 at hotmail.fr
>> >> >> CC: paraview at paraview.org
>> >> >>
>> >> >> Are you connecting to pvserver by any change? If so, did you load
>> >> >> the
>> >> >> plugin on the server side as well?
>> >> >>
>> >> >> Utkarsh
>> >> >>
>> >> >> On Fri, Jul 10, 2009 at 10:55 AM, Fred Fred<stan1313 at hotmail.fr>
>> >> >> wrote:
>> >> >> > I checked it and YES...unfortunately.
>> >> >> >
>> >> >> >> Date: Thu, 9 Jul 2009 09:12:32 -0400
>> >> >> >> Subject: Re: [Paraview] Crash while loading a plugin
>> >> >> >> From: utkarsh.ayachit at kitware.com
>> >> >> >> To: stan1313 at hotmail.fr
>> >> >> >> CC: paraview at paraview.org
>> >> >> >>
>> >> >> >> Are you sure the vtkMyClass source file was listed after the
>> >> >> >> SERVER_MANAGER_SOURCES keyword in the ADD_PARAVIEW_PLUGIN macro?
>> >> >> >>
>> >> >> >> i.e.
>> >> >> >> ADD_PARAVIEW_PLUGIN(MyPlugin "1.0"
>> >> >> >> ...
>> >> >> >> SERVER_MANAGER_SOURCES vtkMyClass.cxx
>> >> >> >> ...)
>> >> >> >>
>> >> >> >>
>> >> >> >> Utkarsh
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> On Fri, Jul 3, 2009 at 2:26 PM, Fred Fred<stan1313 at hotmail.fr>
>> >> >> >> wrote:
>> >> >> >> > First plugin try, first crash, any idea?
>> >> >> >> >
>> >> >> >> > ERROR: In
>> >> >> >> > /usr/local/ParaView-3.4.0/Servers/Common/vtkProcessModule.cxx,
>> >> >> >> > line 1079
>> >> >> >> > vtkProcessModule (0x684b300): Cannot create object of type
>> >> >> >> > "vtkMyClass".
>> >> >> >> > while processing
>> >> >> >> > Message 0 = New
>> >> >> >> >   Argument 0 = string_value {vtkMyClass}
>> >> >> >> >   Argument 1 = id_value {189}
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ERROR: In
>> >> >> >> > /usr/local/ParaView-3.4.0/Servers/Common/vtkProcessModule.cxx,
>> >> >> >> > line 1080
>> >> >> >> > vtkProcessModule (0x684b300): Aborting execution for debugging
>> >> >> >> > purposes.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Abort trap
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ________________________________
>> >> >> >> > Discutez sur Messenger où que vous soyez ! Mettez Messenger sur
>> >> >> >> > votre
>> >> >> >> > mobile
>> >> >> >> > !
>> >> >> >> > _______________________________________________
>> >> >> >> > Powered by www.kitware.com
>> >> >> >> >
>> >> >> >> > Visit other Kitware open-source projects at
>> >> >> >> > http://www.kitware.com/opensource/opensource.html
>> >> >> >> >
>> >> >> >> > Please keep messages on-topic and check the ParaView Wiki at:
>> >> >> >> > http://paraview.org/Wiki/ParaView
>> >> >> >> >
>> >> >> >> > Follow this link to subscribe/unsubscribe:
>> >> >> >> > http://www.paraview.org/mailman/listinfo/paraview
>> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >> > ________________________________
>> >> >> > Souhaitez vous  « être au bureau sans y être » ? Oui je le veux !
>> >> >
>> >> > ________________________________
>> >> > Découvrez toutes les possibilités de communication avec vos proches
>> >
>> > ________________________________
>> > Découvrez toutes les possibilités de communication avec vos proches
>
> ________________________________
> Discutez sur Messenger où que vous soyez ! Mettez Messenger sur votre mobile
> !


More information about the ParaView mailing list