NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface operator : Memory not released

Hello,
In the interface operator provided by Ni “Full-Featured \ CVI”, it would seem that the memory is not released correctly.
By adding the following lines of codes at the end of the hand, one realizes that the number of block and byte are not to 0.
#ifdef _CVI_DEBUG_
{
    unsigned int NbByte;
    unsigned int NbBlock;
    CVIDynamicMemoryInfo (“Fine of the Hand”, &NbBlock, &NbByte, DYNAMIC_MEMORY_SHOW_ALLOCATED_MEMORY);
}
 #endif

A priori that comes from the function:
errChk (TS_LoadMenuBarResourceStrings (gMainWindow.engine, GetPanelMenuBar (gMainWindow.panel), 0, “TSUI_OI_MAIN_PANEL”, errMsg));

In spite of my research, I do not manage to solve the problem.
Somebody would have it the solution or then a track to be exploited.
Thank you in advance for your assistance
0 Kudos
Message 1 of 12
(5,692 Views)
Hello,
To begin,
Wich versions of TS and CVI do you use ?
Best regards
Pierre R...

Certified LabVIEW Developer
0 Kudos
Message 2 of 12
(5,675 Views)
Hello,

TS 3.5
CVI 8.0.0

0 Kudos
Message 3 of 12
(5,675 Views)
Hello,
Someone could it help me ?
Thank you for advances
0 Kudos
Message 4 of 12
(5,601 Views)

Hi:

 

I'm trying out the Resource Tracking window in CVI 9.0 and I see the same problem. The TS_LoadMenuBarResourceStrings function appears to be not freeing memory and some active x objects. I'm using Teststand 4.0.1f1. Any updates on fixing this problem?

 

Cheers,

Dave

0 Kudos
Message 5 of 12
(5,301 Views)

Hello Dave.

 

I found this KB for your problem.

I hope it will help you.

Let me know if it's ok for you.

 

Have a nice day.

Regards.

 

Romain D.
National Instruments France

0 Kudos
Message 6 of 12
(5,280 Views)

Hi:

 

This is not a function call I added myself. If I compile and run the default Labwindows CVI Full Featured User Interface, then the TS_LoadMenuBarResourceStrings call appears to have a memory leak. Are there additional lines of code I can add to free up this memory somehow? If I comment out this line the memory leak goes away (but of course, my menu titles aren't updated correctly).

 

Thanks,

Dave

0 Kudos
Message 7 of 12
(5,277 Views)

Could you give me your code or a part of it which reproduces the problem please?

I will have a look and give you a reply when I know more about this memory leak.

 

Thanks.

 

Romain D.
National Instruments France

0 Kudos
Message 8 of 12
(5,273 Views)

It is the default full featured CVI user interface project. See attached.

If you launch it in debug mode from CVI with the resource tracker enabled, and then close the interface without doing anything, then you should see memory and active x objects not released. I was able to narrow this problem down to the menu function call.

Cheers,
Dave

 

0 Kudos
Message 9 of 12
(5,271 Views)

Hello,

It's not necessary a memory leak.
The memory block allocated you see in the debug not be a memory leak. The memory you see there contains dynamic memory allocated by user (the programmer) and some CVI instrument drivers.
 So in the TestStand example, it uses the TestStand API, UI Controls, Support Library, and Utility Functions. CVI is reponsible to clean up those memory after the execution.
In fact, if you go to any example that is using an instrument driver, such as the XML one in toolbox folder, you will see that it doesn't release all memory at the end either.

 

Regards,

Nacer M. | Certified LabVIEW Architecte

0 Kudos
Message 10 of 12
(5,174 Views)