Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Callback being called after form close

I posted something about this earlier.  I am getting an execution engine exception randomly after the form on my test app closes.  I posted it to the Microsoft forums.  The responders seem to think that the analogCallback is being called after the form is closed, giving this error.  Most of the code is a dead ringer for the code in the the Measurment Studio example for Continuous Multichannel Signal Acquisition Internal Clock.  That sample does not give the error though.
 
The thing that makes this most crazy is that I call the task.dispose() method in the form.closing event.  But I am still getting random (80% of the time) errors when I close the form.  If I rem out the SynchronizingObject=Me line, then the error goes away.  This error, according to the wizards in Redmond, is not supposed to ever happen, and so don't give any help when it does.  I could really use some help.
 
Thanks
 
Joe White
0 Kudos
Message 1 of 2
(2,606 Views)
Joe,

Have you tried including the dispose() method for the reader as well as the task (reader first)? That would be my first shot. Also, could you post the smallest subset of your code that reproduces your behavior? I'll give it a try over here to see if I can get the same error.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 2
(2,587 Views)