Hi I'm currently having some issue with a program I wrote in Teststand. The program is running a parallel model, where each station/test socket is initiated by a notifcation in the back ground thread. I use a "start" button and "cancel" button to control each test. I also have a "restart" button to reset any socket should something go wrong. The start button just sets the notification which is waiting in PreUUT callback. The cancel button uses the "Execution.terminate" command to cancel any running test and the "restart" button just uses the "Execution.RestartEx" command. I found that if I started a test, then cancel the test in the middle of postUUT, the test socket will be in a state where I can not start a test(The executionRunState is 3, and ExecutionTerminationStates is 2). ~ So I need to "restart" the socket. After I restart the socket, everything seems to be working fine until I get a run time error right after the "main" sequence gets executed. I've attached the screen print to this post.
My question is where is this error exactly happening, and why is it happening? I can't seem to figure out where the error actually occur because the highlighted code here doesn't seem to appear in my code or the process model. Also I don't understand why it only occurs after I restarted. I've also attached the sequence file. Thanks a lot.