LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception on DLL when closing the tools window

In my program, I call a DLL in a loop. All is good except when i close the 'tools' windows : when i close the tools windows Labview show a message that an exception occurred and that the execution will be stopped.
I do not understand the link between closing a windows and the exception.

Thanks for help.
0 Kudos
Message 1 of 2
(2,428 Views)
benoitb wrote:
> In my program, I call a DLL in a loop. All is good except when i close
> the 'tools' windows : when i close the tools windows Labview show a
> message that an exception occurred and that the execution will be
> stopped.
> I do not understand the link between closing a windows and the
> exception.

No direct link other than that your DLL tramples on memory it shouldn't.
The arrays it gets passed are somewhere in LabVIEW memory along with
many more information LabVIEW needs to manage itself and all its
Windows. If your DLL writes somewhere it shouldn;t it does destroy vital
information for LabVIEW and when LabVIEW needs to clean up the part
which uses memory in that spot it stumbles and goes awry.

Check that you have all parameters type right
as the DLL function
expects it. Make sure you preallocate arrays and strings in LabVIEw to
the right size before calling the DLL function. One byte to small can be
already enough to cause such seemingly unrelated problems.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 2 of 2
(2,428 Views)