[Paraview-developers] Resolve (paraview) dependencies of plugin

hermann.detz at gmail.com hermann.detz at gmail.com
Tue Mar 6 03:11:46 EST 2018


Regarding your question: I can load the plugin only with paraview
versions that I compiled by myself.

I did some more research now:

When I run paraview with PV_PLUGIN_DEBUG=1, I get the following output:

***************************************************
Attempting to load ...Loaded shared library successfully. Now trying to
validate that it's a ParaView plugin.Plugin's signature:
paraviewplugin|GNU|5.4Plugin signature verification successful. This is
definitely a ParaView plugin compiled with correct compiler for correct
ParaView version.Updating Shared Library Paths: ... Plugin instance
located successfully. Now loading components from the plugin instance
based on the interfaces it implements.---------------------------------
-------------------------------
Plugin Information: 
  Name        : PluginName
  Version     : x.x
  ReqOnServer : 1
  ReqOnClient : 0
Segmentation fault (core dumped)

The relevant code in vtkPVPluginLoader.cxx (after line 541):

  vtkPVPluginLoaderDebugMacro("--------------------------------------
--------------------------\n"
                              "Plugin Information: \n"
                              "  Name        : "
    << plugin->GetPluginName() << "\n"
                                  "  Version     : "
    << plugin->GetPluginVersionString() << "\n"
                                           "  ReqOnServer : "
    << plugin->GetRequiredOnServer() << "\n"
                                        "  ReqOnClient : "
    << plugin->GetRequiredOnClient() << "\n"
                                        "  ReqPlugins  : "
    << plugin->GetRequiredPlugins());
  vtkPVServerManagerPluginInterface* smplugin =
    dynamic_cast<vtkPVServerManagerPluginInterface*>(plugin);


It seems that the code never reaches plugin->GetRequiredPlugins(),
which is defined in PluginName_Pklugin.h, so it's part of the
automatically generated code of the plugin. This function doesn't do a
lot, it just returns an empty string:

  // Description:
  // Returns a ';' separated list of plugin names required by this
plugin.
  const char* GetRequiredPlugins() VTK_OVERRIDE
    {
    return "";
    }

There is nothing, that could go wrong here, which indicates to me that
there is some linking problem and Paraview never actually calls this
function, but probably jumps somewhere else.

Hermann


On Thu, 2018-03-01 at 09:49 -0500, Ben Boeckel wrote:
> On Thu, Mar 01, 2018 at 15:21:38 +0100, hermann.detz at gmail.com wrote:
> > I started with a version that worked for an older Paraview Version
> > and
> > modified it to my needs. I also split the source code in multiple
> > files
> > and added them within the SOURCES line.
> > 
> > INCLUDE(${PARAVIEW_USE_FILE})
> >  ADD_PARAVIEW_PLUGIN(PluginName "2.0"
> >    SERVER_MANAGER_XML PluginName.xml
> >    SERVER_MANAGER_SOURCES PluginReader.cxx
> >    SOURCES SourceA.cxx SourceB.cxx
> >    REQUIRED_ON_SERVER)
> > 
> > This is the only GetXMLs call I found:
> > 
> > void PluginName_Plugin::GetXMLs(std::vector<std::string> &xmls)
> > {
> > PushBack(xmls, PluginNamePluginNameInterfaces);
> > 
> > (void)xmls;
> > }
> 
> So it's actually a vector of std::string which means that NULL
> showing
> up would appear here. It's actually more likely that there's some
> mismatch between the ParaView versions that are loading the plugins.
> Does it work if you load the plugin on the second machine using the
> same
> ParaView binary it works with on the first machine?
> 
> --Ben


More information about the Paraview-developers mailing list