From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview EXE keeps crashing

Solved!
Go to solution

Hello everyone. I need some with help as i have no idea why my executable file  keeps crashing . My 'app' will be able to run for about a few hours until it will eventually crash and say 'Not enough memory to complete this operation.' However i dont think it is a problem with the computer memory as i have observed the app running with my task manager on to check on the memory and ram of the computer and it did not reach full. Does anybody have any idea any help will be appreciated. Thank you in advance for any help!

0 Kudos
Message 1 of 14
(2,210 Views)

Many data structures (such as arrays) are stored contiguous in memory, so if you keep growing, copying, reallocating arrays, there might not be sufficient contiguous memory free to hold  your arrays. This will happen way before your free memory drops to zero.

 

Since you observed the task manager, is the memory footprint relatively stable or slowly increasing with time?

 

Do you have the same problem if you run the same project in the development environment or does the problem exclusively occur using the built application? What does the program do? Is it well written to avoid memory thrashing and fragmentation?

Message 2 of 14
(2,164 Views)

According to the task manager the memory footprint remains relatively stable throughout.

 

I also do have the same problem in the development environment after running the project for about 2 hours.

 

I am not sure how to judge whether it is well written or not as i am relatively new to this software.

 

Would you have any suggestions to solve this?

 

(I included the pop up that appears)

0 Kudos
Message 3 of 14
(2,125 Views)

I am also having the same Issue. Did you get any solution?

Been using LabVIEW for a a few years now, 2019 is the current version on my laptop. I've had LabVIEW crash on me before but not like this. I cannot even force close the application and it occurs every time I try to run my program.

KohlsFeedback Survey Code

0 Kudos
Message 4 of 14
(2,032 Views)

If you open and close lots of ActiveX references windows doesn't release them until the program closes and at 1 million it'll crash. That took me quite some time to find. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 14
(2,097 Views)

@MBSHIRAZIZ wrote:

 

(I included the pop up that appears)


The popup you show doesn't specify out of memory, it's a popup dealing with an Xcontrol.  Did you post the wrong image?  Or does this popup come immediately before or after the "out of memory" message?

 

The popup you posted does show something a bit interesting, as it shows that you are using XControls.  XControls can do a lot of cool things but they also have a lot of problems that come along with them, to the point that there are senior NI employees who advise you not to use them (example here).

 

It might not be the cause of your problem, but if you can refactor your code to remove the Xcontrols it certainly wouldn't hurt the program's stability.

Message 6 of 14
(2,075 Views)

Yes, seems to me you have a faulty x-control, not a memory problem. Did you create it? Did you follow ALL the diagram instructions or did you deviate because you thought you know better. 😄 ?

Message 7 of 14
(2,067 Views)

This popup appears before another popup which says that the app has crashed due to lack of memory. Im not sure what either means but thanks for the help. Do leave any suggestions that you think are viable. 

0 Kudos
Message 8 of 14
(2,050 Views)

I see. What do you mean by "1 million it'll crash' ? Do you mean 1 million samples or...

0 Kudos
Message 9 of 14
(2,028 Views)

@MBSHIRAZIZ wrote:

I see. What do you mean by "1 million it'll crash' ? Do you mean 1 million samples or...


1 millions creations of ActiveX references. 

Since you get "Out of memory" it can also be a false error. Error 2 is OOM, but if something else, like your XControl, generates error 2 internally, it'll still say OOM. I had that happen with an external DLL that used error 2 for some faulty parameter ...

(very small star if you get the reference 😉 )

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 14
(2,011 Views)