09-18-2024 01:26 PM
I am trying to make a real-time control system for my lab. The real-time portion of the code is running on a cRIO-9057 and the front panel is running on a windows machine. I am seeing a memory leak on the order of 100MB/day (rough estimate since I haven't tracked the rate that closely). I am working with NI help and they've been great but the problem persists so I figured I would reach out to the wider community.
I am currently removing sections of the real-time loops to see if the memory leak slows or stops. The removed sections are in the VI named Real-Time Deleted Code. I think the last section I removed (the nested case structures which were originally in the Consumer Loop) were causing part of the leak, but not all.
I've attached the whole project in the zip file below. Please let me know if you need any more information.
Any assistance is greatly appreciated.
P.s. pardon the messy code. I am fairly novice when it comes to LabVIEW and I'm scrambling to get the leak solved before I finish adding some other features and cleaning everything up.
09-18-2024 01:39 PM
As you may know, LabVIEW comes out with new versions every year (such as LabVIEW 2024). Any VIs or Controls saved in, say, LabVIEW 2024, which almost all new users of LabVIEW are using, cannot be opened and read by most of the long-time LabVIEW developers (who may not buy a new version every year, myself, included).
You stand a much better chance of reaching more of the LabVIEW community if you "Save for Previous Version" and specify, say, LabVIEW 2021 (I'm mostly using LabVIEW 2019, but do have 2021 available ...).
Bob Schor
09-18-2024 02:04 PM
Ah, understood, thanks for the heads up! I am using LabVIEW 2024 but am now including a save for 2021.
09-19-2024 10:31 AM
Another update: the flush buffer function in the Consumer Loop was added just before sharing the project. I currently have it running again to see if that fixed the problem. So far I am not seeing a memory leak, but that may just be because whatever process is causing the problem has not yet eaten up the memory that is allotted at start. I will have more updates later.