Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

BFFA1200 IVI ConfigServer Error

Hello,

I use the IviDCPwr Class to control a set of power supplies. An error occure in a TestStand Sequence, with a lot of power supply calls, which runs permanent in a loop.
After 400 - 600 loops the function Iviconfig_Deserialize of the Ivi Configuration Server causes the error: BFFA1200 - "The specified configuration store file could not be deserialized"
I don't know why this error occure. Has somebody an idea?
Thanx!
0 Kudos
Message 1 of 8
(4,127 Views)
CKone,

IVI attempts to deserialize (read) the master IVI configuration store file on driver initialization if the file time stamp has changed since the last initialization. In order for me to fully understand the cause of the error, please answer the following questions:

1. Are you trying to manually (through MAX) or programmatically edit the IVI configuration store while your Test Stand sequence is running?

2. Are you running more than one thread of execution in your Test Stand sequence that is making IviDCPwr calls?

3. Are you running the sequence in parallel model, batch model, or launching a new sequence in a thread?

4. Please note the time stamp of the IVI Configuration store file (typically located at C:\program files\ivi\data\iviconfiguration
store.xml) before you start your sequence and note the time stamp again when you get the error. Did the time stamp of the file change?
0 Kudos
Message 2 of 8
(4,124 Views)
Hi zhaider,

thank you for the quick answer.
To your questions:
1) No I didn't edit (only read) the configuration store file while the sequence was running.
2) I run only one thread of execution.
3) I use the standard sequential model and without launching a new sequence in a thread
4) The time stamp of the file iviconfigurationstore.xml didn't change after the error occured.

I am wondering that the error only after a few hundreds of loops occure. Thus I think it isn't a general fault in our programming.
Do you have any further suggestions?
Thanx
0 Kudos
Message 3 of 8
(4,126 Views)
CKone -
Some questions:
1) Could you post the details of the error that TestStand reports either as text or a jpg if all the text is visible?
2) What version of TestStand are you using?
3) What OS are you using?
4) Under NT/XP you can display a lot of information in the Task Manager for the TestStand process. Using the
View>>Select Columns menu item you can add additional columns to the display. I am interested in what your values are for the following columns before and after the error occurs:
Mem Usage
VM Size
Handles
Threads
USER Objects
GDI Objects

Can you supply these values for the TestStand process, i.e. sequence editor or your operator interface?
Scott Richardson
National Instruments
0 Kudos
Message 4 of 8
(4,090 Views)
Hi Scott,

here are the answers of your questions:
1) TestStand itself indicated no ErrorMessage. We wrote a dll to control the power supplies in our test system. We decided to use the Ivi standard to have the hardware independence. I recognized the error at the call of the function Iviconfig_Deserialize. The return value was -1074130432 (BFFA1200) and the meaning of it, referenced to the IVI Configuration Server Specification 3.5, "The specified Configuration Store file could not be deserialized".

2) TestStand 3.1

3) Windows2000

4) MemUsage between 37000 - 62000kB
VMSize increased to 1900000 !!!
Handles increased to 511500 !!!
Threads constant 22
USER objects constant 578
GDI objects constant 640

A very good tipp to observe the VMSize and the handles. I think the increase of both cause the error.

I step in our sourcecode at runtime and observe the taskmanager. The order in a short form is below:
1)IviConfig_Initialize /* Taskmanager: Function creates ~50Handles */
2)IviConfig_Deserialze /* Taskmanager: Function creates ~1200handles */
...
3)IviConfig_Close /* Taskmanager: Function releases ~800handles */

That means ~400handles aren't released after one loop, and that causes an addition per each further loop.
Even the execution of Unload all modules didn't bring any changes (I thougth this option releases all resources called from TestStand steps...).
Do you have any suggestions why this handles aren't released? Maybe I forgot something important, or is this a memory leak in the IviConfiguartionServer class?

Best regards
Carsten Kilgus
0 Kudos
Message 5 of 8
(4,072 Views)
Carsten,

I understand from your posting that you are making calls to the IVI Configuration Server C API directly in your source code. You should be aware that you must call IviConfig_DisposeHandle() for EACH handle that you get back when using the API. It is not just sufficient to call IviConfig_Close as this will NOT close all the handles that are created.

Foe example, if you call IviConfig_GetDriverSession (), you get a IviDriverSessionHandle* back. You must call IviConfig_DisposeHandle() on this IviDriverSessionHandle handle, otherwise there will be a leak.

Please check your source code to make sure that you are properly disposing of all IVI Configuration Server handles in this manner.

- Best Regards
0 Kudos
Message 6 of 8
(4,059 Views)
Zhaider,

as I understand the function Close is used to release the IviConfigStore handle from the function Initialize. Other handles get from functions like GetSession will be released with the function DisposeHandle. Is this right? If yes, that's already done in my sourcecode.

regards
Carsten
0 Kudos
Message 7 of 8
(4,039 Views)
All right, one handle was created in a loop, this means for each loop iteration one addition handle. But only one time I released it. But now it is working fine. Thanx for your help.
Regards Carsten
0 Kudos
Message 8 of 8
(3,970 Views)