nrp wrote:
> This is extremely difficult to debug as often it takes hours
> before the DLL crashes! I have monitored the memory usage of the
> VI/DLL and it seems to be stable so I dont think its a memory
> leak inside the DLL. I have also confirmed that the parameters
> types defined in the VI DLL call match the DLL iteself.
While the types may match your DLL still could write over the end of a
buffer you are passing in. This is one of the most common errors and
will usually go undedected for a long time. In the worst case the DLL is
only overwriting data non-vital for the LabVIEW system during runtime so
that LabVIEW only crashes when you try to close the application, because
LabVIEW trips over some pointers it tries to deallocate but aren't valid
anymore.
> The DLL is using some form of multi-threading, and I saw a post which
> indicated that it may be something in the LabVIEW garbage-collection
> which is interfering with this. I have tested this by switching OFF
> the multi-threading in the LabVIEW options (I assume this setting then
> gets correctly used when building the .exe?)
Only if you make sure that the according labview.ini file setting is
reproduced in your application ini file.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390