NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence hangs after LabWindows/CVI DLL execution

Hi there, I've written a DLL in LabWindows/CVI that I loaded and executed it successfully in TestStand, with the LabWindows/CVI adapter.

 

The weird thing is that, when the adapter is configured to debug DLL code with an external instance of LabWindows/CVI, the sequence just hangs after the DLL finishs executing its code.

 

If I turn off external LabWindows/CVI debugging, in the adapter configuration, it doesn't hang but other strange errors occur, even crashing TestStand!

 

I reviewed my DLL source code and I didn't find anything problematic. Is it possible that the DLL is overwriting a reserved memory region, thus breaking TestStand functionality?  Have you ever seen that?

 

Thank you very much.

0 Kudos
Message 1 of 2
(3,102 Views)

Yes it's possible that the call is corrupting memory. The most likely way for that to happen is if the prototype specified in TestStand does not match what actually exists in the dll, or if you write more bytes to an array passed in from teststand than the step is specified to be passing from TestStand. Double-check that your prototypes match and that you aren't writing past the end of any buffers or accessing any pointers incorrectly.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(3,081 Views)