Plugins fail to load due to license (?) when opening Editor for the first time after reinstalling one of them

We recently switched to a licensed version of OpenTAP 9.17.4 as our company grew out of the eligibility for the CE version. We use floating licenses.

I seem to be facing an issue related to the commercial version now.

I have a machine where I develop plugins, and sometimes build and install them locally. Every time I rebuild and reinstall a plugin, first opening of Editor results in errors, namely it won’t load any plugins (neither the ones that weren’t updated nor the one that was). If I reopen Editor right away, the issue is gone.

The issue is 100% reproducible.

Any help is appreciated.

Hi @tatiana.boye,

Could you elaborate a bit on what the errors are?

Also, can you reproduce the issue with a basic project?

@rolf_madsen It reads XML config files and fails creating DUTs, Instruments etc.

As an example (real plugin/class names are removed):

2023-02-24 17:09:47.893581 ; Serializer     ; Error       ; XML Line 26: Unable to create instance of Python.<plugin name>.<class name>.
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ; Exception: Object reference not set to an instance of an object.
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at Keysight.OpenTap.Plugins.Python.PythonDutWrapper.load(String name, String moduleName)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at Python.<plugin name>.<class name>.load_instance()
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at Python.<plugin name>.<class name>..ctor()
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at Python.<plugin name>.<class name>..ctor()
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     --- End of stack trace from previous location where exception was thrown ---
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at OpenTap.Plugins.ObjectSerializer.TryDeserializeObject(XElement element, ITypeData t, Action`1 setter, Object newobj, Boolean logWarnings)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at OpenTap.Plugins.ObjectSerializer.Deserialize(XElement element, ITypeData t, Action`1 setter)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ; Exception caught at:
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at System.Object Deserialize(System.Xml.Linq.XDocument, OpenTap.ITypeData, Boolean, System.String)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at OpenTap.ComponentSettings Load(System.Type)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at ResultT Invoke(ArgT)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     at OpenTap.ComponentSettings GetCurrent(System.Type)
2023-02-24 17:09:47.893581 ; Serializer     ; Debug       ;     ...

It seems it doesn’t happen to C# plugins, but only to Python based plugins.

Hope this helps. I’ll try to reproduce it with a basic project later on.

Ah ok, I think it might help if you try to port it to v 3 of the Python plugin - the plugins there behave a bit closer to how the C# plugins works. Or is there a reason why you still use v 2?

The only reason is lack of time… But this issue might be yet another reason to prioritize it.