LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3-4 MB/s memory leak using Labview runtime (with SPT toolbox) and VB

First of all, yes my memory leak really is that big.

I am calling a Labview dll that incorporates the Denoising and Detrending algorithms from the SPT_Wavelet Toolbox. I first tried version 1 of the toolbox with Labview 6.02. I have since tried building the dll using Labview 7 and version 2 of the toolbox with no improvement. The problem occurs under both Windows 2000 and XP, though both running Access 2000.

I have also tried everything recommended under various posts here about avoiding memory leaks including replacing array elements instead of appending to arrays inside loops, ensuring all references are closed etc. These made absolutely no difference (probably because neither were particu
larly big anyway). Removing the calls to the SPT_wavelet dll removes the problem.

The Access 2000 database is used to coordinate the processing of thousands of files, and the 3-4MB/s memory leak occurs each time the dll is called. Memory is only restored by quitting Access. Calling "doevents" doesn't help. It seems that Labview runtime uses Access memory space and isn't released until Access quits.

Urgent help required please: this really is a show stopper.

Thanks in advance,
Joanna
0 Kudos
Message 1 of 9
(3,931 Views)
Hi,

There is a memory leak in one version (don't know which) of the Access ODBC
drivers, that causes a memory leak.

If it's not it, there is probably a memory leak caused by not closing
references. This can be very tricky. How do you communicate with Access?

Regards,

Wiebe.


"Jo" wrote in message
news:50650000000800000090B20000-1068850981000@exchange.ni.com...
> First of all, yes my memory leak really is that big.
>
> I am calling a Labview dll that incorporates the Denoising and
> Detrending algorithms from the SPT_Wavelet Toolbox. I first tried
> version 1 of the toolbox with Labview 6.02. I have since tried
> building the dll using Labview 7 and version 2 of the toolbox with no
> improvement. The problem occurs under both Windows 2000 and X
P,
> though both running Access 2000.
>
> I have also tried everything recommended under various posts here
> about avoiding memory leaks including replacing array elements instead
> of appending to arrays inside loops, ensuring all references are
> closed etc. These made absolutely no difference (probably because
> neither were particularly big anyway). Removing the calls to the
> SPT_wavelet dll removes the problem.
>
> The Access 2000 database is used to coordinate the processing of
> thousands of files, and the 3-4MB/s memory leak occurs each time the
> dll is called. Memory is only restored by quitting Access. Calling
> "doevents" doesn't help. It seems that Labview runtime uses Access
> memory space and isn't released until Access quits.
>
> Urgent help required please: this really is a show stopper.
>
> Thanks in advance,
> Joanna
0 Kudos
Message 2 of 9
(3,931 Views)
My problem is the other way. From within Access a VB script is used to call a Labview dll that I created. This program reads a file based on some inputs passed from VB, denoises and detrends the file data, does some stats and then passes out the stats to VB which then stores the resulting stats in the Access database. This interface worked really well until I tried to add the wavelet processing.

However, since the original post I actually determined that the problem also exists from within Labview itself (V7). (I.E. ignoring Access altogether). When I run a loop that contains the Denoise vi with the settings set to "heursure", "mln" and "T", passing in the analysis and synthesis filters that output from the Wavelet filter vi (for db03 for example) then I se
e the same memory leak. There are no arrays being used by my code, and no references being created. Just a repeated call of the aforementioned standard vis. So it definately seems to be an issue from within the spt_Wavelet.dll that ships with the SPT. The fault doesn't happen if you just use the standard default options, but these are no good for me.

Thanks again for any help (I'd hate to have to abandon Labview and learn Matlab!),

Joanna

PS - My original post should have referred to versions 6 and 7 of the SPT, not versions 1 and 2.
0 Kudos
Message 3 of 9
(3,931 Views)
Joanna, I have notified R%D of this issue and they are currently looking into what is causing the leak. Please send an e-mail in so we can keep you updated on the situation. Also please include any additional information you think may be helpful.

Evan
National Instruments
0 Kudos
Message 4 of 9
(3,931 Views)
Hi, Joanna,
The memory leakage problem has been solved. Please download the attached file to update the "WvltCore.dll" in your system. Thank you very much!

NISH DSP
Medical ultrasound and signal processing
Message 5 of 9
(3,931 Views)
Unfortunately, I did as you suggested and replaced the existing dll in the Windows\System32 subdirectory with this version, but I still have exactly the same leak (in Labview 7 and Labview runtime).

Was there anything else I needed to do?

Thanks again,
Joanna
0 Kudos
Message 6 of 9
(3,931 Views)
Hi, Joanna,
Have you tried to add a while loop with De-noise VI inside? In my test, before dll replacement, the memory leakage existed for Heursure thresholding method. No leakage happens after dll replacement. Could you provide me your leakge testing VI? thanks!

NISH DSP
Medical ultrasound and signal processing
0 Kudos
Message 7 of 9
(3,931 Views)
I don't have the code with me, but here is a screen shot to show you what I used to test it.
0 Kudos
Message 8 of 9
(3,931 Views)
My mistake. XP didn't copy over the old dll properly. I have repeated the exercise and it has definately fixed the problem.

Thankyou very much. Joanna
0 Kudos
Message 9 of 9
(3,931 Views)