LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

issues with labview and memory leaks

Hi,
I do not use DataSocket ActiveX VIs. Does anyone seen memory leaks with DataSocket server?
cosmin 
0 Kudos
Message 11 of 19
(1,648 Views)
Que tal Cosmin,

Tuve el mismo problema que tu, usaba LabVIEW DSC 7.0 y migré a LabVIEW DSC 8.6, y como ya han publicado Ben y Karunya R, es difícil encontrar la solución a algo si no podemos ver tu problema. Este ejemplo solucionó mi problema, espero solucione el tuyo.

Hay algunas cosas que difieren de tu aplicación. Yo estoy usando Win XP SP3. Es recomendable que empieces a considerar cambiar tu sistema operativo a Win XP o Windows Vista, pues Windows 2000 pronto dejará de tener soporte por parte de Microsoft y cada vez será más difícil solucionar tus problemas con este sistema operativo.

Saludos, Julio Díaz


Mensaje editado por juliodiaz
Download All
0 Kudos
Message 12 of 19
(1,617 Views)

Hi Cosmin,

 

If you can't post the whole code, it is possible for you to replicate the problem and put up a smaller piece of code to test. It is difficult to come to any type of conclusion without having something to work with. 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 13 of 19
(1,572 Views)

Regarding the DS memory leak, would the following VI leak in LV8.5?  We call this VI severla times in our code (but not in a loop).  Does it matter how many times we call it?  Does the leak only happen if we call it several times quickly?  Do I need to cache the DS ref so I only call open once?

 

-John

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 14 of 19
(1,566 Views)

Hi John,

 

Are you seeing a memory leak? The only known issue with memory leaks and data sockets is when you use data socket active X VIs. The issue and the workaround is posted here

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 15 of 19
(1,543 Views)

Yes, I am seeing a slow memory leak, but I do not know if it is coming from the DS open-close.  I read the workaround.  What do you mean by 'ActiveX' VIs?  Are the standard DS VIs using ActiveX or are there other VIs for DS that use ActiveX?

The workaround states to open, do all your writes and then close.  What if this operation is used many times in many places in an app that is supposed to run for many weeks?  Am I supposed to cache the open ref and then pass it around?  Is the leak coming from the open command or is the close simply not cleaning up properly?  Does it matter what kind of write or read operation I do (I only use lookout calls to a remote cFP unit).  What if this VI is reentrant and can be called by multiple threads simutaneously?

 

Pleae provide a lot more detail on this issue and look at my VI.

 

thanks,

 

-John

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 16 of 19
(1,519 Views)

Hi John,

 

I took a look at your VI and it does use DataSocket Active X.  An example of a datasocket ActiveX vi is Browse to OPC item.vi in the shipping examples. 

 

I tried to run your VI but it looks like you are using an internal IP address in your VI (which of course I wouldn't have access to). After how long to do you see your memory leak? Have you tried to use the VI profile window to track memory use for your VI. This knowledgebase has instructions on it. 

 

Thanks,

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 17 of 19
(1,499 Views)

My VI just writes to a DIO output on a DIO card in a cFP unit that has the ethernet interface (no controller).  Yes, this is a piece of HW in out lab.  You could easily reproduce this by writting to a DIO card in your own cFP unit at NI.

I do see a slow leak (over many days) in my application.  I call this VI about 200 times a day.

 

So, what you are telling me is the bug with DS will cause this VI to leak.  Do you have any suggestions for how to work around this?  The problem I have is many asyncronos threads are calling this VI so it has to be set to reentrant and therefore storing one global DS session and reusing it is not practical.

 

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 18 of 19
(1,494 Views)

Sorry jlokanis. I just re-read my last post and realized that I forgot that all important NOT in this sentence. " I took a look at your VI and it does use DataSocket Active X". What I meant to say was the your VI does NOT use ActiveX datasocket VIs.So this bug is NOT applicable to you.

 

I am curious to know how to diagnose that the memory leak is due to this particular VI.

 

Thanks!

 

 

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 19 of 19
(1,456 Views)