LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler crashes with Out of memory message

The CVI compiler crashes when I am trying to recompile my project. I am running 8.1.0 (271) version under Windows XP professional with SP2. It start compiling and towards the end, virtual memory goes up quickly to 2GB and I got "Out of memory" message. It usually crashes after that.
Thanks for any ideas.
0 Kudos
Message 1 of 7
(4,308 Views)
Hi Cimteker,

First, when you say "it crashes", do you mean that LabWindows/CVI crashes and closes, or the compiling process terminates? Also, is this a Windows memory error or a LabWindows/CVI error?

I would try running a very simple project ("Hello, World!" might be appropriate) and see if this out of memory error still occurs during the compiling process.



Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 2 of 7
(4,279 Views)

Hi Evanp,

I think it is a CVI message. It will not compile the project, sometimes it will crash (dissapear) other times it will give an out of memory error and once I click OK it will continue, but a few seconds later another error usually appears about an invalid handler. There's a big jump in virtual memory from 300MB to 2.1 GB. I can compile my project OK if I delete half of my code so I think "Hello world" would compile as well. 

 

 

0 Kudos
Message 3 of 7
(4,274 Views)
Cimteker,

It sounds to me like the compiler may actually be finishing its operation and the error is happening at the very beginning of execution. 

Your idea of narrowing down your code to find the problem segment is a good one; I would suggest further isolating code to find out what section is causing the massive amount of memory allocation. Once this is narrowed down to a small segment we will have a better idea what exactly is happening.

Thanks.



Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 4 of 7
(4,253 Views)
I am not asking it to execute. I am pretty sure it happens during compilation (build) process. My system has Intel Core 2 Duo, not sure if it makes any difference.
0 Kudos
Message 5 of 7
(4,250 Views)
I did not know you were only compiling, apologies. I would still try to narrow down the problem code so we can analyze the problem further.




Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 6 of 7
(4,246 Views)
I have seen this behavior.  It has been a while and was with CVI 7.1, but in my case it was also a coding issue, something in a switch statement and the placement of braces, or declaration of a variable.  I wish I had saved the test case, but there are odd code structures that will not generate a syntax error but will cause the compiler to suddenly think that it has consumed 2G of memory.  
0 Kudos
Message 7 of 7
(4,224 Views)