LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"Out of memory" error on compile

I get an "out of memory" error when I compile my code. 
- I modify my code, compile it (ctrl-M), and I get this error.
- I haven't started running my code yet, so I cannot trace the problem.
- I am in DEBUG mode (with breakpoints on first line of code).  I need it to step through my code.  (RELEASE won't help me).
 
If I exit out of CVI 6.0 (under Windows XP), and re-load CVI, then I compile-and-run (Shift-F5), it works!  and I can debug at my breakpoints.
- however, when I modify my code and try to re-compile, I get this error again.
 
A co-worker told me that this is an internal CVI6 stack problem, and has been fixed with CVI 8 (the one he's using), but I need it working under CVI 6.
 
Any suggestions?
0 Kudos
Message 1 of 5
(3,573 Views)
After the "Out of memory" error, CVI is displaying an error indicating I couldn't write to the (myProj.CDB) file.
 
I didn't know if this would help.
0 Kudos
Message 2 of 5
(3,572 Views)

Hello,

The "Out of Memory" can occur for various reasons, but we can do a few things to narrow down the problem.  If you do think its a stack size problem you should be able to increase it in the Options»Build Options menu.  I would normally recommend trying a sample program to compile if you were not ever able to compile but since you can do it under some circumstances I don't think its a compiler/environment problem.  When you mention you modify the code do you mean if you make any changes (even something as simple as commenting out a line, or adding a space to the end of a line) or are you actually making real modifications to the program?  You mentioned your colleague said that things should work under CVI 8, and I am curious to see if you tried to compile in 8 does it work then? 

There are various mentions of this error in our forums and old Service Requests with many resolutions so nailing down the solution might not be easy.  One thing we might try is to see if we can compile parts of the program to narrow down a particular source of the problem since we know its something with this program.  Please let me know if you get any conclusive results from these test or have any more information and we can continue tracking down this problem.

 

John B.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(3,503 Views)
> When you mention you modify the code do you mean if you make any changes (even something as simple as commenting out a line, or adding a space to the end of a line) or are you actually making real modifications to the program?
 
Even something as simple as commenting out a line, recompile and relink code causes the out-of-memory error.  Also I want to mention that for the longest time, I have been using the code without this problem; however, when some of my buffers were enlarged (away from stack though, used arrays of malloc() calls ... to put it in the heap).  I diff'ed my code from working ones (via CM) and these were the only project changes.
 
> You mentioned your colleague said that things should work under CVI 8, and I am curious to see if you tried to compile in 8 does it work then?
 
Yes.  I got a license from our IT to use CVI85 and it doesn't seem to have these compile/link problems anymore - same exact code under CVI6.
 
> There are various mentions of this error in our forums and old Service Requests with many resolutions so nailing down the solution might not be easy
 
Yeah, I tried to narrow down the search too, but couldn't get anywhere (I don't remember any posts that were similar to my problem).  I will try to look at those posts again to give you examples of things I tried.
0 Kudos
Message 4 of 5
(3,500 Views)
Update:  during compile of my code in CVI 8.5, the "Out of Memory" persists when I first go to my code, but after I press OK, I can continue modifying it and compile it again.  When I close CVI 8.5 and go back into the same project, the "Out of memory" comes back.
0 Kudos
Message 5 of 5
(3,452 Views)