Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing object error

Hi,
I am having a problem. I am writing a VB .net app that works fine until I try to do a continuous Analog acquisition.  It works fine, I think, but when I try to close the form, I get this error message:  "An unhandled exception of type 'System.ExecutionEngineException' occurred in S3NP code.exe"
 
Here is the code that I am using. 

Try

aireader =

New AITask

reader = New NationalInstruments.DAQmx.AnalogMultiChannelReader(aireader.Stream)

reader.SynchronizingObject = Me

callback =

New AsyncCallback(AddressOf analogInCallback)

running =

True

reader.BeginReadMultiSample(100, callback,

Nothing)

Catch ex As Exception

MessageBox.Show(ex.Message)

'Show the message in a messagebox

running =

False 'set the boolean to false

aireader.Dispose()

End Try

If I comment out the line about the Synchronizing object, I do not get the error, but the code does not work properly either.  According to Microsoft, this error is not supposed to happen.  RIGHT!!!!!

 

Just for grins, I am using a DAQPad 6016, VB.net 2003 and Measurement studio 8.

 

Thanks

Joe White

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

That was on the machine I wrote the code on.  If I take it to another machine that does not have the IDE on it, I get

Cannot access a disposed object named "NationalInstruments.UI.WindowsForms.NumericEdit".  Object Name: "NationalInstruments.UI.WindowsForms.NumericEdit"

 

Thanks

Joe White

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

Never Mind.  I refreshed the license file and it all went away.  Go figure.

 

Joe

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