Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

System.overflowexception - how to track down

My application is constantly give me this error:

A first chance exception of type 'System.OverflowException' occurred in NationalInstruments.Common.dll

Any idea how to track this down?

-Steve
0 Kudos
Message 1 of 8
(3,687 Views)
Hi Steve,

Are you using a graph control to plot NaN or infinity? Exceptions like this are thrown if ProcessSpecialValues is not set to true. See here and here. Other than that we'd need to know specifically what function in the Common library is throwing the exception by stepping through it with the debugger.
Test Engineer - CTA
0 Kudos
Message 2 of 8
(3,674 Views)
I am processing numbers between 0.0 and 5.0.  I should not be coming across anything that is NaN or infinity.

Also, What control does ProcessSpecialValues belong to?  It is not lsited in the WaveFormGraph (not DigitalwaveFormGraph) help in the properties list?
0 Kudos
Message 3 of 8
(3,660 Views)
Steve,

The property is available by right clicking the graph and selecting Edit Plots... It should be in the Behavior category.
Test Engineer - CTA
0 Kudos
Message 4 of 8
(3,653 Views)
I found the property and changed it but the error continued to happen. So, I removed all the graph controls (2) from the application but the error still happens.  Its happening very frequently, like something is happening in a loop but I don't think its related to the graphs.

-Steve
0 Kudos
Message 5 of 8
(3,652 Views)
Hi Steve,

Could you perhaps post a small example that demonstrates the exception? Since that suggested knowledgbase didn't work it would be nice to see an example of the behavior.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 6 of 8
(3,644 Views)
I'd love to, but I don't know what's generating the exception so I have nothing to post.  I went so far as to comment out every line in the program leaving empty subroutines and the problem persisted. 

I was able to resolve the problem however via trial and error. Turns out is wasn't anything in the code I wrote but seems to have been related to something I did via the designer. One by one, I unbound each NV from my NetworkVariableDataSource.  I re-ran the program after each unbind.  Eventually the error stopped happening. One (or more) of the bound NVs was causing the problem.  I have been able to put back all the NVs and the error has not returned.

So, I don't really know what caused the problem, but I figured out to resolve it.   This is kind of un-nerving since I don't know what I did that caused the problem, I don't know how to avoid it in the future.  I am chalking this up to my ignorance working with NVs.  Would it be possible for NI to include more detail in the error messages? That would be helpful in determining which NV(s) caused the problem.
0 Kudos
Message 7 of 8
(3,636 Views)
Hi Steve,

Atleast you got rid of the error but I wish we couldn't have seen it on our side.  We are working on improving the network variable documentation and error codes in later versions of Measurement Studio. What I would suggest to help us out, is to look at our current Network Variable documentation in the NI Measurement Studio Help and let me know if you find something missing, misleading, would prefer to have more information on, etc. To do this, simply send me a product suggestion.

Thanks

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 8 of 8
(3,630 Views)