LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory error

My application crashes for memory error on LVS61D5 module after several hours of running. The application is built using Labview 7.0 and frequently calls one CIN (Visual C++ compiled) that controls one ISA acquisition board.
Large amount of RAM is used in the CIN C++ code (up to 2560KB) to temporarily save data.
PC runs Windows98SE and 512MB of RAM is installed.
Any suggestion?
Thanks
0 Kudos
Message 1 of 2
(2,609 Views)

Hello,

Can you provide any additional information about this memory error such as the error message? Also, is this a LabVIEW memory error or a Windows memory error?

Crashes in LabVIEW when working with CINs are frequently caused by errors in the C code of the CIN. Since a crash doesn't happen for several hours, it might be a small memory leak which eventually crashes your application. A large amount of memory is being used by this CIN and it is called frequently. The likely cause of the crash is that something is not being deallocated properly or perhaps the parameters are incorrectly passed to the CIN.

For some information on using CINs, go to
http://www.ni.com
and click on Support. In Option 3, enter "memory error CIN" (without quotes) in the Keyword box. The first link should be a KnowledgeBase referencing memory errors. This will give some information. In the "Related Links" section at the bottom, there is a reference to the Code Interface Reference Manual. If you follow that link and open the PDF (here), you will find a lot of information on using CINs. On page A-2 of Appendix A, it talks about VIs containing CINs crashing LabVIEW. However, this reference is not the most up to date. To find the current information, open LabVIEW and go to Help, "Search the LabVIEW Bookshelf." Under "Concepts and Techniques," click the "Using External Code in LabVIEW (PDF only)" link.

An easy way to test if the CIN is causing problems is to enclose the CIN inside a case statement. Make it the false case and wire a true constant to the case. This will disable the CIN from being called. In the true case, generate (randomly or statically) the same amount of data that the CIN returns. Try running your program this way for several hours and observe if it still crashes. If not, the problem is with the CIN and you'll need the source code to debug it. Also, if this board is made by NI, try using the VIs rather than a CIN.

Happy coding,

Grant M.
National Instruments

0 Kudos
Message 2 of 2
(2,609 Views)