TestStand Execution Appears to Hang When an Error Occurs While Running Multiple Threads

Updated Jun 13, 2018

Reported In

Software

  • TestStand

Issue Details

I have noticed that if a run-time error occurs in a step while there are code modules (e.g. LabVIEW VIs, DLLs) running in other threads, the execution simply stops with the debugging tools (i.e. Step Into, Step Out, Step Over, Resume) disabled. When I manually stop the code modules in the other threads, the TestStand Run-Time Error dialog box appears and I can continue executing my sequence.

Why doesn't the TestStand Run-Time Error dialog appear immediately on an error? What can I do to fix this?

Solution

By default, TestStand is configured to show a Run-Time Error dialog when an error occurs. In this case, whenever a step throws an error, TestStand tries to break the execution so that it can show a Run-Time Error dialog. However, the execution cannot break while any of its threads are not at a breakable location (i.e. while a thread is running a code module). In this case, when a step throws an error, TestStand is waiting for the modules in other threads to finish executing so that the execution can break and the Run-Time dialog can be shown.

In order to make TestStand show the Run-Time Error dialog immediately on an error, without waiting for the modules in other threads to finish executing, you can use the Thread.ExternallySuspended property within your code modules.
 

Additional Information

Please refer to the documents linked below for an explanation on the Thread.ExternallySuspended property and how to use it. You can also refer to the TestStand Programmer Help on this property.

WAS THIS ARTICLE HELPFUL?

Not Helpful