NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand API in Statement calls or in Expressions cause TestStand to hang

Hi,

 

We are using TestStand 4.0.1f1. And we added 2 patches that NI send us at the time, so the version is 4.0.0.1060. I know, I know, it is an old version, and probably not the more stable version.

 

One of these hangs cases is pretty weird. I attached a test bench that we developed to prove it. We are launching 16 executions, each of them launching 2 executions. Now, if I have 2 successive calls using the following expression: Parameters.Step.StepType.Name (in this case, we are talking about the "If" and the "Select" in SeqModifBool, SeqModifNum and SeqModifString), TestStand will hang.

 

Now, if I add two ActiveX calls in the setup of these sequences, one to get the Step Type and one to get the Step Type Name, if I put the step type name in a Locals (Locals.StepTypeName), and if I use the local variable in the "If" and "Select" steps instead of the expression defined previously, then it is working fine!

 

Now, since we have a couple of these hangs, we were wondering if you have an exhausting list of all the use cases that can cause TestStand to hang using 4.0.1f1 version.

 

Thanks a lot!

Alex

0 Kudos
Message 1 of 7
(4,147 Views)

Hi Alex,

 

I don't think this is a bug with TestStand, but more with the CPU usage reaching 100%. If you check your task manager when it freezes you should see the same behavior. I think this may be happening because each execution is calling the expression which is causing the CPU usage to increase. I could not find a list of known issues with TestStand 4 but here is a link with the known issues for TestStand 4.2.x. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(4,121 Views)

Hi Adam,

 

I have been trying on a multi-core CPU, and the CPU is around 50%. Anyways, it seems weird to me that if I do:

 

1) If (Parameters.Step.StepType.Name != "blabla")

2)    Select ( Parameters.Step.StepType.Name )

 

It freezes. Now, if I do:

 

1) ActiveX to get StepType from Parameters.Step => Locals.StepType

2) Activez to get Name of StepType => Locals.StepTypeName

3) If (Locals.StepTypeName != "blabla")

4)    Select ( Locals.StepTypeName )

 

It works. Looks to me like a TestStand bug. I know that using the first technique is not optimal, and probably not following good programming standard, but still, TestStand should not hang... Anyhow, it is no big deal since we have a workaround for this one. I was just looking for the Bug List for 4.0, which I could not find, just like you.

 

Thanks

Alex

0 Kudos
Message 3 of 7
(4,117 Views)

I can reproduce the freeze with the sequence file you attached in the latest version of TestStand, 2010. However, I tried changing the expressions to use ActiveX steps as you recommended, and I see the same freeze. I attached the modified sequence file. Did I modify it as you intended? If not can you let me know what should be done or attach one that uses ActiveX steps and does not freeze?

 

As far as programming practices, using the API calls through expressions should absolutely be fine.

 

I'll find out how early our bug fix lists go back and let you know.

0 Kudos
Message 4 of 7
(4,083 Views)

You can find the known issues list for your current TestStand version in the Readme.html file, located in the <TestStand>\Doc directory. You can also launch the Readme from the Start menu (Start>>Programs>>National Instruments>>Documentation>>Readme.html).

 

A list of bug fixes dating back to TestStand 4.0 can be found in the most recent version of the TestStand Help, which is available online. 

 

http://zone.ni.com/reference/en-XX/help/370052J-01/

 

Select What's New in TestStand, then the version you want to look at, and then click Bug Fixes to see the list for that version.

Tom
TestStand Documentation
Message 5 of 7
(4,065 Views)

Hi,

 

You would have to change Parameters.Step.StepType.Name for Locals.StepTypeName where it is used. I attached a sequence with no freeze, sorry for not doing it the first time.

 

In fact, what is making it to freeze, from what we have seen, is when Parameters.Step.StepType.Name is used in consecutive steps, in consecutive executions.

 

Another behavior that we have noticed, with the freezing sequence, is that it will hang within the first 20 seconds. If it does not, then it will run fine. It won't freeze at all.

 

Thanks

Alex

 

0 Kudos
Message 6 of 7
(4,059 Views)

I verified the hang doesn't happen with your attached 'Test Bench No Freeze.seq' file. I also found the original hang does not happen consistently, but I can get it to happen. I filed a bug report on this issue. The ID is 276979. Thanks for reporting this issue and I apologize for any inconvenience it's caused.

0 Kudos
Message 7 of 7
(4,026 Views)