NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with unloading Code Modules

Dear all,

 

first of all: Happy New Year!

 

We are currently seeing a issues when unloading code modules, which can be tracked down to a certain part within our framework.

 

The situation:

We can execute a the testsprogram, incl setup and cleanup of our instruments without problems. But as soon as we “Unload all Modules” or shutting down the engine (when running from the OI), a runtime error is thrown indicating an access violation.

 

We suspect that Teststand tries to unload a module which is no longer loaded.

 

In order to further debug this systematically: how can we find out, which CodeModules are registered within TestStand?

 

I’ve checked the API and Forums (https://forums.ni.com/t5/NI-TestStand/About-Module-Load-Unload/td-p/3158478
)  without any success.

Seems all the issues described in the forum just have the opposite effect where CodeModules keep running / are not unloaded.

 

https://www.ni.com/docs/de-DE/bundle/teststand/page/reserving-loaded-vis-for-execution.html?srsltid=...

 

 

 

Thanks for any input!

 

Best Regards

Oli

0 Kudos
Message 1 of 3
(68 Views)

Use Process Explorer as your task manager.  It will show all modules that are loaded by an application.  Just setup to "View > Lower Pane" and "Lower Pane View > DLLs" . Select your OI and then observe the lower pane.

eejallen_1-1736265355989.png

 

 

Message 2 of 3
(46 Views)

Hi, 

When you call unloadAllModules, the TS engine releases its references to any module that was loaded by the engine. Technically any module that is still referenced by TS should not be unloaded. There are some cases in which that is possible to unload modules but that should not cause an access violation. 

 

Most likely there is some other code is either executing during unload of a module or code that is expecting a module to exist but was unloaded. 

 

Please attach a debugger like Windbg or Visual Studio to the TS process to get more information about the access violation. Start with getting the call stack for the access violation and proceed from there. 

Regards, 

Anand Jain

NI

Message 3 of 3
(22 Views)