08-21-2019 01:57 AM
Hi,
I have a very big problem and after one week I have no idea if there is a solution for that problem at the end.
Over the last 15 months I developed a simulation tool that ends up with some stacked barplots (~100 bars of 6 single stacked bars). Now I have to create ~ 4500 pictures (or screenshots) of the different results...to use them in a web application. The problem: after creating 80 pictures the LabVIEW application is out of memory (error 402901 @ View.vi). Even if I don´t show the pictures and only save them, a out of memory problem occurs. Even if do the picture generation it in a SubVI and deallocate the memory after a single plot. The max number of pictures depends on the picture size if visible and the number of elements in the picture. Is there a other way to deallocate the memory after using the advanced plotting tool kit ?
Help needed...
Make my day with a good idea! Ralf
08-27-2019 01:19 PM
That shouldn't happen, but to help we would need to see your code.
Craig
08-27-2019 04:18 PM
Will Labview 64 bit version help you, since it can allocate a lot more memory?
08-29-2019 01:25 AM
I´m using LabVIEW 2018 Version 18.0f2 (64bit)
That doesn´t help
@studer wrote:
Will Labview 64 bit version help you, since it can allocate a lot more memory?
08-29-2019 02:37 AM
Thank you: I prepared a Vi for the discussion:
This is the subVI I want to call for 4500 times. The Array with the cluster inside on the left side has max.103 elements. The five "For Loops" on the left side (white) are only necessary to sort and name elements for the final picture.The green "For Loops" create max.103 stacked barplots and ~Text-labels.
The result is shown in the second jpg File.
After calling that subVI, I deallocate the memory in the main vi.
I can call the SubVi ~72 times... than the error occurs.
If I reduce the bars I can call it more often...
PS. The small SubVi under the second green For Loop is only writing the property node for the text labels,... couldn´t be the problem
I tested:
It has the same effect on different computers
It has the same effect when I build an exe file
Taking a look into the Task Manager of Windows I see that the amount of memory the VI uses is increasing the whole time
Any ideas....?
Ralf
08-29-2019 04:06 PM
Those are just pictures of your code, not a VI that can be improved and tested. 😉
I think that at sometime an error occurs somewhere in your code and you aren't handling the error. It might not be related to your plot at all. You are generating a huge string (APT just sends a formatted string to MatplotLib) but without error handling it would be hard to track down when and where it happens.
I'd suggest you use a program structure like the attached. Clean up your code and add it to the subvi. To clean up that code, use commonly accepted labview style guidelines to make it easier to understand. Inputs on left, output on right, wires run left-right as much as possible.
Craig
09-05-2019 08:23 AM
Thank you!
I want to follow your recommendations but actually I have no time because of other projects... I hope I can come back to that problem in October...
I am very sure that the error did not occur at another part of the code, but I will test it.
...commonly accepted labview style guidelines..
I reduced the code for a better understanding of the problem... without a clean up. Sorry.
09-05-2019 08:37 AM
Hopefully you can get it sorted out eventually.
If you have time, attach the actual VIs and some test data and I might be able to help.
Cheers.
Craig