LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview logging program crash windows after 2 days

I am using Labview 8.0, and running the executable the program. What this program does is that it acquires data and then writes to hard drive. Each set of data is small but it writes also every second. It will create a new file every day so the file does not get too big.

After 2~3 days running, it crash windows. I think it somehow used up all the resource so the windows would not even response any more. And we need to run this program continually for at least one month.

So is this a memory leak problem of the executable program generated by Labview app builder? or could that be Labview does not release memory after it writes data to the file, and eventually used up the resource?

any suggestions?

Thanks
0 Kudos
Message 1 of 6
(2,613 Views)

You did nomention what kind of operating system, size of your data, the amount of memory. In any case, I am using windows xp sp2 512 MB, I write data out ever 5 seconds and the machine has run for 3 weeks. I keep have to reboot the machine because all of the patches required on the operating system. The data is written out to a new file every hour. Each file is roughly 240K for each file. On top of that, I have another logging process that operates only when I have an active process. It collects data every minute and can take up to 10 days to complete.

I think you have leaky process in your VI. I suggest that you simulate the process with writing data out only to see if it crashes, increase your memory, etc.

Check your process status. See if you are swapping data out or you are near your memory limits.

0 Kudos
Message 2 of 6
(2,609 Views)
It is on a laptop with win xp, 1GB Ram. each data is only 40~50 bytes. The concatenate strings does not duplicate in memory, right? what about build path and open file?  Do I need to close the file inside the loop? It is a very small program so I attached a screen capture here.

I am going to let it restart again and check memory usage tomorrow.

Thanks,
0 Kudos
Message 3 of 6
(2,604 Views)
You realize you are constantly opening a new file handler all the time (each loop) and not closing it. You will need to fix your code up so that you close your file before you open another file handler.
Message 4 of 6
(2,597 Views)
so even if the file name is the same, it will create new file handler not used the old one?
so all I have to do is move "close file" inside the loop to fix this?

Thanks,
0 Kudos
Message 5 of 6
(2,592 Views)

Hi DGU

yes, to move the close.vi into the loop should solve the problem unless there is an other problem.

How often do you write data into this file? If you write very often data into it, then its not a good solution to open and close the file every time. I think there should be a better solution for it.

Mike



Message Edited by MikeS81 on 01-30-2008 02:28 AM
0 Kudos
Message 6 of 6
(2,567 Views)