Hi Guys,
Though this is not a major issues, this had annoyed me for a while. I had an error with the designer when closing some forms. See image attached.
Then, while debugging, I saw some strange System.ArgumentException in the ouput.
Here's the error:
System.ArgumentException occurred
Message="Impossible to convert objet type 'System.EventHandler' to type 'System.ComponentModel.CollectionChangeEventHandler'."
Source="mscorlib"
StackTrace:
à System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
And here's the call stack:
mscorlib.dll!System.RuntimeType.CheckValue(object value, System.Reflection.Binder binder, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) + 0x313 bytes
mscorlib.dll!System.Reflection.MethodBase.CheckArguments(object[] parameters = {Dimensions:[1]}, System.Reflection.Binder binder = null, System.Reflection.BindingFlags invokeAttr = Default, System.Globalization.CultureInfo culture = null, System.Signature sig = {System.Signature}) + 0xc8 bytes
System.dll!System.ComponentModel.ReflectEventDescriptor.RemoveEventHandler(object component = {Plots=8}, System.Delegate value = {System.EventHandler}) + 0x155 bytes
System.dll!System.ComponentModel.ReflectPropertyDescriptor.RemoveValueChanged(object component, System.EventHandler handler) + 0xbc bytes
NationalInstruments.UI.dll!NationalInstruments.Restricted.PropertyChangePropertyDescriptor.RemoveValueChanged(object component = {Plots=8}, System.EventHandler handler = {System.EventHandler}) + 0x38 bytes
NationalInstruments.UI.dll!NationalInstruments.UI.PropertyEditorSource.Dispose(bool disposing = true) + 0x80 bytes
NationalInstruments.UI.dll!NationalInstruments.UI.PropertyEditorSource.Dispose() + 0x1d bytes
NationalInstruments.UI.WindowsForms.dll!NationalInstruments.UI.WindowsForms.PropertyEditor.Dispose(bool disposing = true) + 0x89 bytes
System.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
System.Windows.Forms.dll!System.Windows.Forms.ToolStripControlHost.Dispose(bool disposing) + 0x39 bytes
NationalInstruments.UI.WindowsForms.dll!NationalInstruments.UI.WindowsForms.ToolStripPropertyEditor.Dispose(bool disposing = true) + 0xf7 bytes
System.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
System.Windows.Forms.dll!System.Windows.Forms.ToolStrip.Dispose(bool disposing = true) + 0x1a8 bytes
NationalInstruments.UI.WindowsForms.dll!NationalInstruments.UI.WindowsForms.InstrumentControlStrip.Dispose(bool disposing = true) + 0x85 bytes
System.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.Dispose(bool disposing = true) + 0x170 bytes
> GraphLibrary.dll!Opsens.Controls.LabViewChart.Dispose(bool disposing = true) Line 21 C#
I think the line is the root of all this:
NationalInstruments.UI.WindowsForms.dll!NationalInstruments.UI.WindowsForms.InstrumentControlStrip.Dispose(bool disposing = true) + 0x85 bytes
The InstrumentControlStrip again, but this time at run time also.
Can you guys look into this? I had done some basics checks on my own code to see if I was wrong using it at some point, but I found nothing apparently wrong. This was also in 8.2.1 and it is still in 8.5.
Thanks,
Jean Gauthier
Opsens