NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Model System Level Exception

I have a sequence that uses the Batch model with 40 test sockets. Once in a while, I'd get a -17502, System Level Exception in step 'Run Dialog' of sequence 'Run Batch Info Dialog' in BatchModel.seq. I'm wondering if anyone using the batch model has a similar error. Also, somethimes the system would freeze when generating the reports at the end. I don't see the errors with the first run but only after several runs and I'd need to reboot to clear the errors.
 
I'm wondering if any of the adapter configuration settings may cause the problem. My sequence makes a variety of calls (LV, LW/CVI, external EXE, Excel ActiveX) locally and remotely on a different PC.
 
Also, is there a way to reset the TS engine? This may be a temporary fix without having to reboot the PC or log off and log in again.
 
Thanks in advance.
0 Kudos
Message 1 of 11
(4,539 Views)
Hi Terago,

To get a better idea of the error you are receiving, could you please provide a screenshot of the error message.

Regarding the report generation, running that many test sockets is going to require a good amount of memory to generate the reports. What do you mean when you say "the system would freeze when generating the reports at the end". Does TestStand become completely unresponsive forcing you to shut it down or does it just take a long time to generate the reports?

Another that would be helpful in finding the problem is to open Task Manager, go to the Processes tab, then go to View»Select Columns... and check Handle Count, USER Objects, and GDI Objects. Monitoring these columns during the execution of your sequence and generation of your reports will give us an idea as to how memory intensive the process is.
Manooch H.
National Instruments
0 Kudos
Message 2 of 11
(4,512 Views)
Attached is the screen shot of the error. The system would hang after OK is clicked.
The only way to recover is to terminate the process from Windows task list and reboot.
 
This error happens regularly and sometimes it'd freeze without any error.
 
Terago
0 Kudos
Message 3 of 11
(4,505 Views)
Terago,

Thanks for the screenshot. I will look into this error as well as look into the BatchModel.seq and get back to you.
Manooch H.
National Instruments
0 Kudos
Message 4 of 11
(4,483 Views)
Terago,

Have you made any changes to the process models in your BatchModel.seq? Could you please post a copy of your BatchModel.seq file?
Manooch H.
National Instruments
0 Kudos
Message 5 of 11
(4,466 Views)

 

I have not made any changes to BatchModel.seq. The modifications that I've done:

1. modify batchuutdlg.c to accept the serial numbers passed from TestStand and not blank them out each time.

2. Overridde PreBatch to do serial number processing.

3. Override PostBatch to save test data to Excel and put up a message to see if the operator wants print all the reports.

4. Override a function in reportgen_xml.seq to print all the reports if .

 I got another weird error today, when running a particular test I put up a LV panel that runs in parallel with the TestStand sequence.

It displays a bunch of error messages,  "Sequence Editor: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress".

This is the first time I've seen this error message and I'm wondering if it's related to the other error mentioned above.

 

Terago

0 Kudos
Message 6 of 11
(4,426 Views)

I've fixed the BufferedGraphicsContext  error. I have a tight polling loop where the steps in the loop have the "Record Result" enabled.

TS allocates memory to record results for these steps and would run out of memory after a while and cause the error.

What I don't understand is why it's still recording results even though I disable it in the calling step. I thought this would override "Record Result" for all the steps in the called sequence but this is not true.

The System Level Exception Error still remains. I look at the BatchModel.seq, it calls Run Batch Info Dialog sequence as a new thread only once at the beginning to Initialize and Run the dialog. This sequence does not get called anywhere else. In my case the error happens when the sequence is called again which should never happen. I'm wondering if any memory/stack corruption would cause the sequence to be called again?

 

Terago

0 Kudos
Message 7 of 11
(4,406 Views)
Hi Terago,

Regarding the first issue of "What I don't understand is why it's still recording results even though I disable it in the calling step. I thought this would override "Record Result" for all the steps in the called sequence but this is not true.", this is because the results will be collected while the called sequence is running and those results will be discarded upon returning to the calling sequence.  If you wish to disable recording results in a particular sequence, you need to open the sequence and navigate to Edit » Sequence Properties... and select "Disable Result Recording for All Steps".


Now, regarding the System Level Exception error, I have a few more questions to help us narrow down on the cause.  Does this error occur if you run the sequence for 10 UUTs instead of 40?  How much memory is there on your test system?  Can you place a breakpoint in your process model to monitor when the sequence is called a second time?  Is it possible for you to post your sequence file so that I can take a look at it?  You are correct in that a memory corruption is a common cause of a System Level Exception error. 
Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 8 of 11
(4,358 Views)

Hi Jessica,

Does this error occur if you run the sequence for 10 UUTs instead of 40? 

If I run with just one UUT and the remaining 39 test sockets disabled the error still occurs frequently. However if I configured the model options to just 1 or 2 test sockets, I haven't seen the error (it's possible that I haven't tried long enough).

How much memory is there on your test system? 

1GB.

Can you place a breakpoint in your process model to monitor when the sequence is called a second time?

Where exactly in the process model do you suggest? I've noticed when the error occured, the arrow is pointing to the "Run Dialog" step and the calling stack window displayed only the "Run Batch Info Dialog" sequence on top of the stack so I'm not sure where it's called from. The error typically happens after MainSequence have finished and before the test status box is displayed.

Is it possible for you to post your sequence file so that I can take a look at it? 

I'd rather not post it in the forum. I probably can email it to you if you give me your email address.

Thanks,

Terago



Message Edited by terago on 07-28-2008 02:23 PM
0 Kudos
Message 9 of 11
(4,354 Views)
Hi Terago,

I can contact the forum administrator and obtain your email address so that I can talk to you directly.  If you are fine with this, just post back and I will contact you directly on this.


Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 10 of 11
(4,345 Views)