LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Out of memory

From time to time I'm receiving 'Out of memory' (-12) error trying to start my application from CVI IDE. OS doesn't report any problem with low virtual memory level. Why does it happen? I never have this problem before running the same project on slower machines with less physical memory.
I have CVI 6.0 installed on Celeron 300MHz :),196MB RAM with Win2K, total declared memory is over 450MB. CVI with my project consumes 130MB
0 Kudos
Message 1 of 4
(3,824 Views)
Hi,

The first thing to do here is to locate the point where you get this error. Is it when loading the application or is it when the application loads the CVIRTE? in general CVI will ask the OS for the memory and report what the OS reports back.

Have you tried opening some other project and see if you can replicated? Another idea is to use the UI to code converter under the tools menu and see if generating the UI programmatically makes any difference.

Please post more specifics so that we can work on this.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 4
(3,824 Views)
Hi,

NI examples work fine. I've observed describbed problem only in my project. 'Out of memory' happens always in the same place in code (LoadPanel function - see atachment, with the same stack trace). Runtime is initialized succesfully. If I don't change anything and try to run the application once again it also fails but the thirth try is sucessfull?! The problem never happens if application is started using Ctrl+F5. It also never happens on my desktop PC with similar software configuration buth with more physical memory (see atachments)
My application is composed of dozens pannels and I have to change them quite often so generating the UI programmatically is not acceptable.
Because I've developped several large size applications using C
VI I have grounds for expect the reason in CVI enviroment.

Regards
Jaroslaw Przywieczerski
Download All
0 Kudos
Message 3 of 4
(3,824 Views)
Jaroslaw,

The fact that you get the error a couple of times and then the application works wih no problem could indicate that the memory is fragmented (there is memory available but not in a segment of the size that is needed). That is depending on the time that you ask the OS for memory it has a page with enough space or not. You may want to increase the size of the virtual memory, defragment your hard drive and restart the computer to see if this makes any difference.

Another thing that you can try is putting the panels in separate uir files and load them from those separate files; this way the size of the memory chunk needed will be smaller.

Hope this tips helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 4 of 4
(3,824 Views)