LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW freezes after program completed

I have a problem where LabVIEW freezes after the program has completed if the program has been running for a long time. That is, the shutdown itself is not a problem (I set a status message as the last thing I do in the program, and that message is displayed properly), but LabVIEW takes forever to go back to edit mode, and keeps using around 50% CPU. After the last run today LabVIEW has so far used 25 minutes, and still there is no sign of the edit mode. For short run times (I have tried up to maybe 2 hours) there is no problem.

 

The program is a data acquisition program, and it has quite a lot of data. Because of this, I reprogrammed it to use circular buffers to remove allocation problems. The circular buffer has a total size of around 300 MB.

 

I am using LabVIEW  8.5.1 on Windows XP SP2.

 

With regard, Birger 

0 Kudos
Message 1 of 4
(2,781 Views)

One first hint of memory trouble is the task manager. Open it and monitor the memory and cpu usage of LabVIEW (or your exe).

More detailed information can be gained by using the LabVIEW performance and memory tools found at Tools/Profile/Performance and memory ...

 

My 90% guess is a memory leakage somewhere in your code

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(2,772 Views)

I didn't even know it was possible to get memory leak in a LabVIEW program. I thought all sub-vis and functions was automatically garbage collected when the program exited.

 

In this case though I do not think there is any memory leak as the memory consumption (as shown by the task manager) do not grow over time, even after the program has run for several days. The problem occures after the program has finished.

 

I will look into the Tools/Profile/Performance and memory tool to see if this tells me anything new.

 

with regard,

Birger

0 Kudos
Message 3 of 4
(2,741 Views)

Another approach: try to scale down your code to produce just this error and post your code here, so other can test it.

 

Beside of LabVIEW, how about the driver? 

I remember having problems with an old visa-driver, crashing while closing ports. Do you use the most recent drivers ? Do you open/close devices frequently? 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 4
(2,728 Views)