External Plugins with separated contexts for every individually loaded file

Hi all,

We wrote a plugin for our own data format. If we load just one file with this plugin, everything is working fine. If we load in the same ParaView session another file with the same plugin, the context of our ParaView plugin for the first file will be overwritten. In this case, both cases are still available in the “Pipeline Browser” but there is no way to access the data of the first model.

Is there a way to create a new context per file loaded via an external plugin?

I use the ParaView superbuild with ParaView 5.6.0.

Thank you very much in advance.

Best,
Stefan

Could you share your plugin? @mwestphal

Hi,

I could share the code, but it links against a license protected dynamic library (loaded via dlopen). Therefore, a functional test would not be not possible.

Shall I share the code anyways?
More or less my question is: how is there just one instance of the plugin in one session that is reused for all models?

Any module-level variables are shared between reader instances. So basically avoid globals or out-of-class state. The idea behind the code sharing is to see if that’s happening.

1 Like