02-23-2004 04:33 AM
02-24-2004
04:08 PM
- last edited on
08-19-2025
05:16 PM
by
Content Cleaner
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