How to correctly add a reader plugin?

(Caobaolu) #1

Dear all,
I’ve tried several days to build my own plugin and resulted in no success. I managed to compile ParaView from source and tried the sample plugin called mypngreader. After I load the plugin and try to open the .mypng file, the error shows up in the outwindow “vtkSISourceProxy (000001DD6D517FF0): Failed to create ‘LXPNGReader’. This typically means that ParaView does not know about the request class to create an instance of if. Ensure that it has been correctly wrapped using the client-server wrappers and the wrapping has been initialized. Note class names are case-sensitive. Check for typos. Aborting for debugging purposes.” Really have no idea how to fix it.
The plugin source can be found here
Please help me out, thank you very much!

(Ben Boeckel) #2

Instead of this:



MODULE_FILES LXPNGReader/vtk.module

This will build the module and cause the plugin to load the client server wrapping code for its classes.

(Caobaolu) #3

Thank you very much for your reply~
I followed your advice, but encountered the error bellow when I tried to load the plugin

ERROR: In D:\Caobaolu\MyParaView\Source\paraview\ParaViewCore\ClientServerCore\Core\vtkPVPluginLoader.cxx, line 417
vtkPVPluginLoader (0000021FF60FA4C0): 找不到指定的模块。

找不到指定的模块: means can’t find the module

(Caobaolu) #4

the setting has been updated here, could you please help me?

(Ben Boeckel) #5

Hmm. It loads on Linux. Are you loading LXPNGReader.dll or libLXPNG.dll? The plugin is the first one.

(Caobaolu) #6


(Caobaolu) #7

I am working on windows :grinning:

(Caobaolu) #8

I tried again, it worked! Thank you very much!!!
Need to run “install” to generate the dll

(Ben Boeckel) #9

Hmm. Odd. What was the build tree and install tree layout (basically, where were the DLLs mentioned)? This may be fixed on master, so what commit are you using?

(Caobaolu) #10

I use vs2017 to compile the plugin, and the build tree is shown below.

and the dll is located in the below dir

C:\Program Files (x86)\LXPNGReader\bin\paraview-5.6\plugins\LXPNGReader

(Ben Boeckel) #11

Sorry, should have been more specific. The LXPNGReader.dll or libLXPNG.dll files are somewhere in your build tree. Both should live under bin\paraview-5.6\plugins\LXPNGReader, but a bug that was fixed on May 1 (commit 59e5bd9e93076ed1fc23c01051e01c5463b6c861) caused the libLXPNG.dll to probably be directly under bin instead.