Calling Dispose() on an instance of NanoDeviceOperations(NDO) causes subsequent instantiations of NDO to fail when calling ListDevices(). I have one board with a Gecko MCU connected via USB on COM port 3; calling ListDevices() once will return a 1 as expected but after the first NDO instance has been closed and a second one instantiated ListDevices() takes significantly longer to return and returns a 0.
NDO instance B's functionality should not be affected by calling Dispose() on instance A prior to instance B's creation. With the solution provided above, calling ListDevices() should return 1 both times instead of 1 then 0.
Played around with this a tiny bit more. I found that this bug is not exercised if ListDevices(false) is called. Calling it with getDeviceDetails == true does still trigger the issue, however.
Tool
nanoff
Description
Calling Dispose() on an instance of NanoDeviceOperations(NDO) causes subsequent instantiations of NDO to fail when calling ListDevices(). I have one board with a Gecko MCU connected via USB on COM port 3; calling ListDevices() once will return a 1 as expected but after the first NDO instance has been closed and a second one instantiated ListDevices() takes significantly longer to return and returns a 0.
How to reproduce
A solution that reproduces the issue can be found at: https://github.com/Skyworks-Timing-Software/publicNanoframeworkSamples/tree/main/NanoFFNanoDeviceOperationsDisposeBug. The code being called can be found in the screenshot below:
Expected behaviour
NDO instance B's functionality should not be affected by calling Dispose() on instance A prior to instance B's creation. With the solution provided above, calling ListDevices() should return 1 both times instead of 1 then 0.
Screenshots
No response
Aditional context
NuGet packages installed: