06-01-2007 02:34 PM
Trey B,
This works!!!!!!!!!!!!!!!!
Thanks for sure.
Please ignore my last post.
--Julia
06-04-2007 11:16 AM
06-04-2007 11:16 AM
06-04-2007 11:24 AM
06-05-2007 06:44 PM
@jyou wrote:Yes, it works if I only execute the "load" (call DLL) first, then "unload" (give an empty string to the dll reference) . If the "load" and "unload" is in the same VI and executed in sequence, it would crash if you run the VI againIt must be a leak somewhere.
----Julia
06-06-2007 07:17 AM
TreyB,
I have to go back one step. With simple load, I run the VI without problem. then I provide empty path to the dll reference to the same VI and re-run the same VI as unload. It has no problem. I can repeat this load and unload many times. However, if I chose exit/close this VI, LV crashs. Cause by memory.cpp. ............ With the same VI, if I load and unload DLL in series in the same run, LV crashes regardless I try to run the same VI or another VI/application. Basicly the LV was "dead" after run the series of DLL call.
Do you think this Is DLL's problem ? Thanks in advance
---Julia
06-07-2007 10:07 AM
06-07-2007 12:10 PM
"What is the specific error that you are getting?"
The error is:
Fatal Internal Error: "memory.cpp", line 342
06-07-2007 05:03 PM - edited 06-07-2007 05:03 PM
DLL crashes don't always happen when you call the DLL. Overwriting LabVIEW memory sometimes won't show symptoms until LabVIEW tries to access something that uses that memory.
Message Edited by Trey B on 06-07-2007 05:06 PM
05-18-2010 11:44 AM
Trey,
The KB article to which you linked [http://digital.ni.com/public.nsf/websearch/77594203D78D12278625729100758BE5?OpenDocument] is very useful. Unloading a .dll has been something I've wanted to do on occasion and previous versions of LV (pre-8.2) would not allow it. So, this is a nice feature to finally have. Vital, in some circumstances.
But here's a question. The article states, "If an empty or invalid path is wired to a different node than the one that initially called your DLL it will not unload the DLL from memory." It goes on to show a wrong way to do it: by placing two identical CLFs in a dataflow chain.
But what if the naked CLF instances were replaced by the CLF inside a non-reentrant subVI? Then it would be calling the same instance of the CLF. Would that be kosher? One can't always put code in a state machine or other loop structure as in the example. See my subVI diagram below.
Any illumination would be very much appreciated. Thanks!