NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Klayson

Disable Engine Callbacks during Development

Status: Declined

I'm closing this idea due to limited support from the community and the workaround listed by Doug.

In a recent Test Stand training session at my work, we learned about Engine callbacks and specifically about the Load and Unload ability to run code when simply loading or unloading a TS sequence file.  In speaking with our FE, there is no was to disable the Engine callbacks and he asked that I post this request.

 

Without the ability to disable this feature, there can be inadvertent to malicious consequences.  The loading or unload of a sequence file needs to be passive during development so the sequence file can be reviewed and verified to be harmless before putting the sequence file out for production use.

 

In the inadvertent instance, a developer could produce something that they are not quite sure will work and it could produce a side-effect. It would be good to be able to open this sequence file and review all the steps before the Engine Load callback has any chance of running.

 

In the malicious instance, the Engine Load could be used to perform unwanted events - I.E.. Performing a system call to format the C: drive, making a remote connection to an external computer, etc. during the code load and before anyone has a chance to review the sequence file and verify that it is harmless.

 

The Engine callbacks are a great feature but with the inability to disable them creates a great security risk. There needs to be an option in the TS Sequence Editor to disable all or selected Engine callbacks and then a sequence file can be opened safely and reviewed before execution.

 

3 Comments
warren_scott
Active Participant

Here's my desired use --

 

I am developing some sequence-modifying scripts (write code in LabVIEW to start TestStand engine, open sequence file, traverse the structure and make changes according to a formula).  In this case it would be really nice to be able to open and close the sequence files without envoking the sequence file load/unload callbacks.  This is especially problematic because the scripts are designed to fix code linkage issues with broken sequence files, and if there are issues with code in the load/unload callback, you keep getting error messages trying to find the code as it tries to execute.  (and sometimes you don't have all the code modules on your system when you are trying to do something like this, so the number of popup messages to find the code gets annoying for something that is supposed to be a "quiet" upgrade fixer application)

dug9000
NI Employee (retired)

Hi Warren,

 

There are already some APIs which should allow you to do what you are asking.

 

For your use case, using the GetSeqFile_DoNotRunLoadCallback option with GetSequenceFileEx is probably sufficient since you are creating a separate standalone app where you know no one else will be loading the file.

 

There are multiple ways to do it though, so if you want to consider some of the other options, see the API help for GetSeqFileOptions.GetSeqFile_DoNotRunLoadCallback, ReleaseSeqFileOptions.ReleaseSeqFile_DoNotRunUnloadCallback, and SequenceFile.UnloadCallbackEnabled.

 

Hope this helps,

-Doug

WireWeaver
Active Participant
Status changed to: Declined

I'm closing this idea due to limited support from the community and the workaround listed by Doug.

https://www.linkedin.com/in/trentweaver