LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"There is not enough memory to perform this operation."

"There is not enough memory to perform this operation."

I am a seasoned LV user and I understand about memory management and memory leaks. My question is, when our application (.exe) gets the above error message, is there a LV log somewhere or any way to find out the call chain that got this error? The application has thousands of VIs, with a lot going on, so it's difficult to troubleshoot where it's happening. Is it possible that this error shows up for reasons other than truly lack of memory? There seems to be plenty of memory, and the app continues to run after dismissing the error (but perhaps part of it somewhere has stopped, we are hunting for this). The app usually runs for weeks or months and never gets this error, but sometimes this error appears after just a few days. It has happened in both our LV/DSC 8.6 runtime exe on Windows XP and LV/DSC 2011 runtime exe on Windows 7.

What's the best way to track it down?

 

0 Kudos
Message 1 of 7
(7,301 Views)

Large arrays need contiguous memory, that's why you might run out even if plenty of fragmented free memory is available.

 

What do you see in the task manager? Does the memory use always increase slowly over time?

 

A good tool to troubleshoot could be the DETT toolkit. Do you have it?

0 Kudos
Message 2 of 7
(7,289 Views)

Is it possible that this error shows up for reasons other than truly lack of memory? 

 

If you gorch a network reception or a file read, and then pass that value unquestioned to a function, then it's possible that you're asking to initialize an array with 3,000,000,000 clusters of data, instead of the five it should have been.  That will result in the NOT ENOUGH MEMORY message.

 

You don't really need all that memory, but LabVIEW doesn't know that, since you actually asked for it.

 

 

Ways to track this down:

1... Find a way to reproduce it.  Does it only happen after 43 days of continuous use?  Does it happen after processing 72 files?  Find something common between different crashes.

2... Use CONDITIONAL DISABLE SYMBOLS to turn on debugging. Create/Replace a file when the program starts, and open/write/close it BEFORE and AFTER each major operation.  Don't use a debugging cache, as the crash will then hide your last few entries - the ones that you need.

3... If you're facile with network stuff, do the same thing but send debugging messages out a TCP connection.

4... Look into the Remote Debugging feature.  I haven't used that.

5... Open the TASK manager and watch memory usage: when does it go UP, when does it go DOWN.  I found a memory leak this way. I was loading a VI into a bunch of Subpanels, and I was confused about who owned the reference to the VI. When this window came up, the memory usage went UP (by 120-150 MBytes), when the window was closed, it DID NOT go away.  20 or 30 times, and poof!

 

6... from out of left field comes this one: check for a MilliSecond Timer overflow.  Remember that the mSec timer is a U32.  That means that it will overflow every 4 billion mSec. IIRC, that's something like 45 days.  If you're running continuously, that could happen and maybe confuse something.  I don't know when the mSec timer is set to zero - reboot, LV startup, I don't know.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 7
(7,262 Views)

All good suggestions, I'll need some time to pursue them. Thanks, guys!

 

0 Kudos
Message 4 of 7
(7,219 Views)

New information:

When we check the Application Event Log, there are a series of LabVIEW 404 errors at the exact time we got the "not enough memory" error dialog in the application, such as:

8/7/2013 8:15:48 PM LabVIEW Error None 3299 N/A Computer1 "LabVIEW information: Error: 404 ""Not Found"" for ""/"", file ""c:/program files/national instruments/shared/ni webserver/www/"": Can't access URL ."

 

Attached is a subset of one event log. There are also crypt32 errors ALL the time, but we don't think those are the problem.

 

We found some discussion about this error 404, ID 3299 but it's not clear to us what it means or what we can do about it.

http://forums.ni.com/t5/LabVIEW/Error-message-404/td-p/1767016/page/2
I think this talks about these errors happening at startup, as services get started. This is not our situation.

http://lavag.org/topic/16727-event-log-entry-when-service-not-started/
We use VI Server to run VIs dynamically, both locally and remotely (on another computer), but in these cases we don't think we were using any remote VI Server connections, and anyway, all application references, VI references, etc would have been allocated and cached and used many times at this point in the code. In other words, our application was running in a steady state, doing the same thing it had been doing for days, with no user interaction. We wonder then, if the error was caused by something happening at that time in Windows, maybe OS update check, or NI update check...?  Windows updates are enabled for download but not automatic install, however the logged-in user does not have internet access. (We will get updates changed to be not automatic.)

 

0 Kudos
Message 5 of 7
(7,169 Views)

Can you confirm that this happens on a different crash?

 

IOW do you have such a log on another machine, or on this machine at another time?

 

 

Do you have a Virus scanner running?

 

Can you stress the machine(s) to make it more likely to happen?

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 7
(7,163 Views)

Good questions, Steve, thanks.

Yes, we saw the same 404 errors, but not as many, in the Event Log at the same time the "not enough memory" appeared on a different day of the week on a different computer. Attached is another log.

Virus scanner is Trend Micro Officescan, does weekly scan.

We can't really do stress testing because our customer is running real-life experiments 24/7. We haven't seen this error anywhere else (on our computers or at other customers).

 

0 Kudos
Message 7 of 7
(7,147 Views)