I've been programming a GUI for a project. The basics of the program is a sample routine that updates a array once a second. Once the array is updated I use a event handler to plot the new array in a graph.
When I wrote this gui I think I've stumbled upon a bug in Labviews memory allocation.
If you have two loops. One that builds a array and then signals a loop with a eventhandler that reads the array and the event handler is stoped for a few seconds (by opening a sub vi or something inside the event handler), the memory goes berserk. When the event handler is free after the stop the memory is still allocated and does not return.
I could not find any information on this problem in the forum so I thought I would share this information with everyone. I managed to reproduce this phenomena in a small example (attached), if anyone is interested in it. The problem is simple to fix once you recognize the problem. However it was not the simplest problem to find (imho that is ;)).
Where are you seeing the memory being allocated? What tool are you using, task manager or LabVIEW profiling? I'm not seeing what you describe (LV 7.1.1 on a 3.4 GHz Pentium 4 w/ 1 Gb memory)
Thanks,
Putnam Certified LabVIEW Developer
Senior Test Engineer North Shore Technology, Inc. Currently using LV 2012-LabVIEW 2018, RT8.5
When you press the "enable bug" - button and look at the amounth of memory the application has it should grow fast or at least it does over here. Im running the vi compliled. Lv 7.1 under a linux system.
It does not seem to have any effect to change the event to mouse down or mouse up.
The event is stoped so my guess is that labview begins to copy memory into some sort of queue and then when the event handler is released it never free:s up the memory (Just a guess. I have no ídea of how labviews internal memory handling works.).
One other thing. Put a probe in the iterative counter of the while loop. It would be interesting to see if for some reason the event in triggered several times instead of just the one time it is supposed to run.
I will run your program on a Linux Redhat 8.0 machine and if I can reproduce what you are experiencing and that the behavior differs from what will occur on a Windows machine I will write a bug-report as soon as possible.
Will keep you updated.
Regards, Jimmie A. Applications Engineer, National Instruments
Regards, Jimmie Adolph Systems Engineering Manager, National Instruments Northern European Region