LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My RT-PC crashes periodically

I was hoping that someone could help me decipher why my RT-PC is crashing.  I have written a real-time server, which is now undergoing testing out in the field.  Every few days or so, it will reboot itself.  The technician sent me the error log entry from around the time of the latest crash, which I have attached.  It seems like the PC is running out of heap memory.  Do any of you have any suggestions as to how I can fix this?  At the moment, I am looking through my code for unbounded shift registers.

 

Thanks,

Mike

0 Kudos
Message 1 of 5
(2,772 Views)

Hi Mike,

 

If you post your code, we could probably help you analyze it. I would look for arrays, queues etc. as well.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(2,767 Views)

Thanks for the offer!  I do not think my company would allow me to post the complete project online, though, and the code has 200+ subVIs anyway.  I am mainly wondering if you think I am on the right track in looking for memory elements that have grown too large, or if you have experienced this problem before.  The RT-PC is also hosting a shared variable engine, in case that matters. 

 

Does anyone know of a way in which I could easily monitor which VIs are consuming the most memory?  Essentially, I would like to be able run the Performance and Memory profiler on the deployed executable.

0 Kudos
Message 3 of 5
(2,765 Views)

Yes, you are right in looking for memory elements although I cannot be positive without looking at the code. But, I am sure you are on the right track. Try to run a simple VI and see if your computer restarts, then run a modular part of the code to see if anything happens and get started with your debugging that way. Also, I forgot to mention it in my last post since it slipped my mind but do you have access to the Real-Time Execution Trace Toolkit? That should help you identify memory allocations, sleep spans, and resource contention.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 5
(2,760 Views)

If the code is leaking meory it should also leak in the development environment.

 

LV 8.X plus has an option in the project that lets you check memory usage.

 

For RT apps these should start out using a max amount of memory and then gradually settle in on a smaller amount. If your memory usage is climbing, then you are onto the right idea.

 

In adition to the arrays watch for files growing, stirings being concnatenated, and error clusters piling up since the text filed of the erro cluster requires memory.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 5
(2,749 Views)