03-01-2007 04:20 PM
03-02-2007 01:35 AM
In 99.99999999% of the cases where LabVIEW memory gets modified magically either in causing random data as you have seen or causing crashes at random moments such as when closing a VI or LabVIEW altogether, it is indeed a DLL overwriting memory it should not have done, and in about 95% of those cases it is because the person implementing the Call Library Node VI forgot to allocate one or more buffers in the LabVIEW diagram for a DLL function array or string output parameter. The other 5% are because of bugs in the DLL.
@slugger wrote:
ta
i assume what Jarrod stated is the problem then huh?
03-02-2007 03:54 PM - edited 03-02-2007 03:54 PM
Message Edited by Jarrod S. on 03-02-2007 03:54 PM
03-03-2007 12:52 PM
03-04-2007 02:33 AM
Nice feature indeed Jarrod! But, yes there is a but, or maybe not!
@jarrod S. wrote:
You might also note, slugger, that LabVIEW 8.2 took some steps towards helping users deal with this exact issue. When you configure a string parameter for your DLL, there's a new setting you can configure called Minimum Size. Here you can make your allocation directly in the Call Library Function Node, instead of having to write G code to do the same. The good and bad thing is that your problem is very common, so it's always a goal of ours to try to help out!