09-17-2015 03:11 PM - edited 09-17-2015 03:15 PM
@Arroyo wrote:
PS: I´m not pretty sure how to dispose the images.
09-18-2015 02:30 AM
Thanks for your detailed answer.
My subVIs contain several other SubVIs and execute many IMAQ operations within loops. Some copys of the images are created within the process in order to prevent destructive operations such as IMAQ Extract from affecting the images I have wired as Shift Registers. I try to dispose every image after it has been used. Images are quite big, in the order of 7000X3000 pixels.
I belive my main problem is to convert everytime arrays to images and viceversa. Each SubVI must do these actions.
When I open LabView it consumes 150MB. During the first execution the memory consuption reaches a peak of 1,6 GB and when the exceutions has finished, it remains at 1,2 GB.
During the second execution, the program starts at the 1,2 GB reaches 1,61 GB and ends up at 1, 21 GB, approximately. I have a memory leak of 10 MB in every iteration. Still haven´t figure out where.
I will disable the debuging mode, and close the front panel to see how perfoms.
Best regards,
Esteban
09-18-2015 03:33 AM
I faced this same issue in other application of reading an large excel sheet and processing the array, I got no solution for it, but when i created the exe it works fine everytime the memory consumption goes back normal. so, try buiding exe and check once.
09-18-2015 07:48 AM
09-18-2015 07:52 AM
The reason, as stated before, is a requirement for the future integration of the SubVIs in a .NET solution.
09-18-2015 09:08 AM
The pragmatic way to resolve this post would be to create a VI, or set of VIs, that recreate your memory issue. All of these lovely forumers could then recreate the issue and help you solve it from there. Commonly, performing this step will lead you to your solution on its own.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-18-2015 10:55 AM
If you do post an example, try to include some standard data with it. You can do this by running the VI once and either create a constant on the indicator that holds the 2D array, or click "set as default" on the control that took the input data.
09-18-2015 10:57 AM
If the same 2d array is being passed to each sub-VI...
Crate an Action Engine with a method "Load data" which will place the 2d array in a shift register.
Crate actions for each sub-VI you have now and put the processing of the sub-VI in the appropriate action case.
TO start out I would NOT crate sub-VIs inside the action engine to do the number crunching.
If you code that AE right, the 2d data should sit in-place one shift register and not be duplicated.
If you get past that hurdle, then sub-VI can be created bu be sure to wire the 2-d wire through the sub-VI as described in the "Clear as Mud" Thread so that the sub-VI work in the SR buffer.
Ben
09-18-2015 11:38 AM
@James.M wrote:
The pragmatic way to resolve this post would be to create a VI, or set of VIs, that recreate your memory issue.
Thanks, I was trying to bring in pragmatism, but I think the OP was thinking of a different word. 😄
09-18-2015 12:21 PM - edited 09-18-2015 12:26 PM
@altenbach wrote:
@James.M wrote:
The pragmatic way to resolve this post would be to create a VI, or set of VIs, that recreate your memory issue.
Thanks, I was trying to bring in pragmatism, but I think the OP was thinking of a different word. 😄
It's problematic that OP used "pragmatic" instead of "programmatic" and his code tactic is mystic because he can't share it. The forum should also be more emphatic regarding title veracity to predicate specific search query quality.
(I spent way more time on thesaurus.com than I'm willing to admit. )
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'