到目前为止,就像很多这样的主题一样,我遇到一个问题,即这个异常发生在一个特定的地方(5% 的时间)和其他地方。
第一行代码是这样的
((DefinitionDetailForm.FindNameInContent("DataFieldDefinitionPoints") as DataField).
FindName("DefinitionScoringPoints") as RadNumericUpDown).
Minimum = 0;
首先,我认为我可能需要将引用保留在一个字段中,但这也无济于事。
另一种情况是在一个未定义的地方,我什至在调用堆栈中都没有得到任何东西,所以我不能提供更多信息:(
至少有人对第一个有想法吗?
编辑:
当事情中断时调用堆栈
[管理到本地转换] System.Windows.dll!MS.Internal.XcpImports.SetValue(MS.Internal.IManagedPeerBase obj, System.Windows.DependencyProperty 属性, 字符串) + 0x6f 字节 System.Windows.dll!MS.Internal.XcpImports.SetValue(MS.Internal.IManagedPeerBase doh, System.Windows.DependencyProperty 属性,对象 obj) + 0x2ce 字节 System.Windows.dll!System.Windows.DependencyObject.SetObjectValueToCore(System.Windows.DependencyProperty dp, 对象值) + 0xd6 字节 System.Windows.dll!System.Windows.DependencyObject.SetEffectiveValue(System.Windows.DependencyProperty 属性,参考 System.Windows.EffectiveValueEntry newEntry,对象 newValue)+ 0x35 字节 System.Windows.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.DependencyProperty 属性,System.Windows.EffectiveValueEntry oldEntry,参考 System.Windows.EffectiveValueEntry newEntry,System.Windows.DependencyObject.ValueOperation 操作)+ 0xe6 字节 System.Windows.dll!System.Windows.DependencyObject.SetValueInternal(System.Windows.DependencyProperty dp, 对象值, bool allowReadOnlySet, bool isBindingInStyleSetter) + 0x248 字节 System.Windows.dll!System.Windows.Controls.TextBox.Text.set(字符串值)+ 0x33 字节 Telerik.Windows.Controls.Input!Telerik.Windows.Controls.RadNumericUpDown.UpdateText() + 0xa5 字节 Telerik.Windows.Controls.Input!Telerik.Windows.Controls.RadNumericUpDown.OnValueChanged(Telerik.Windows.Controls.RadRangeBaseValueChangedEventArgs e) + 0x1f5 字节 Telerik.Windows.Controls!Telerik.Windows.Controls.RadRangeBase.OnValueChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) + 0x105 字节 Telerik.Windows.Controls!Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) + 0x58b 字节 System.Windows.dll!System.Windows.DependencyObject.RaisePropertyChangeNotifications(System.Windows.DependencyProperty dp, object oldValue, object newValue) + 0x53 字节 System.Windows.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.DependencyProperty 属性,System.Windows.EffectiveValueEntry oldEntry,参考 System.Windows.EffectiveValueEntry newEntry,System.Windows.DependencyObject.ValueOperation 操作)+ 0xf3 字节 System.Windows.dll!System.Windows.DependencyObject.RefreshExpression(System.Windows.DependencyProperty dp) + 0x47 字节 System.Windows.dll!System.Windows.Data.BindingExpression.SendDataToTarget() + 0xff 字节 System.Windows.dll!System.Windows.Data.BindingExpression.SourceAcquired() + 0x5f 字节 System.Windows.dll!System.Windows.Data.Binding.EnsureBreakPoint(System.Windows.Data.Debugging.BindingDebugState debugState, System.Action callback, bool canDelay) + 0x47 bytes System.Windows.dll!System.Windows.Data.BindingExpression.System.Windows.IDataContextChangedListener.OnDataContextChanged(object sender, System.Windows.DataContextChangedEventArgs e) + 0xa4 字节 System.Windows.dll!System.Windows.Data.BindingExpression.DataContextChanged(object sender, System.Windows.DataContextChangedEventArgs e) + 0xc 字节 System.Windows.dll!System.Windows.FrameworkElement.OnDataContextChanged(System.Windows.DataContextChangedEventArgs e) + 0x1e 字节 System.Windows.dll!System.Windows.FrameworkElement.OnAncestorDataContextChanged(System.Windows.DataContextChangedEventArgs e) + 0x26 字节 System.Windows.dll!System.Windows.FrameworkElement.NotifyDataContextChanged(System.Windows.DataContextChangedEventArgs e) + 0xcb 字节 System.Windows.dll!System.Windows.FrameworkElement.OnTreeParentUpdated(System.Windows.DependencyObject newParent, bool bIsNewParentAlive) + 0x3d 字节 System.Windows.dll!System.Windows.DependencyObject.UpdateTreeParent(MS.Internal.IManagedPeer oldParent,MS.Internal.IManagedPeer newParent,bool bIsNewParentAlive,bool keepReferenceToParent)+ 0x4a 字节 System.Windows.dll!MS.Internal.FrameworkCallbacks.ManagedPeerTreeUpdate(System.IntPtr oldParentElement, System.IntPtr parentElement, System.IntPtr childElement, 字节 bIsParentAlive, 字节 bKeepReferenceToParent, bool canCreateParent) + 0xf8 字节 [管理到本地转换] System.Windows.dll!MS.Internal.XcpImports.FrameworkElement_MeasureOverride(System.Windows.FrameworkElement 元素,System.Windows.Size availableSize) + 0x62 字节 System.Windows.dll!System.Windows.FrameworkElement.MeasureOverride(System.Windows.Size availableSize) + 0x18 字节 System.Windows.dll!System.Windows.FrameworkElement.MeasureOverride(System.IntPtr nativeTarget, float inWidth, float inHeight, out float outWidth, out float outHeight) + 0x9e 字节 [管理到本地转换] System.Windows.dll!MS.Internal.XcpImports.FrameworkElement_MeasureOverride(System.Windows.FrameworkElement 元素,System.Windows.Size availableSize) + 0x62 字节 System.Windows.dll!System.Windows.FrameworkElement.MeasureOverride(System.Windows.Size availableSize) + 0x18 字节 System.Windows.dll!System.Windows.FrameworkElement.MeasureOverride(System.IntPtr nativeTarget, float inWidth, float inHeight, out float outWidth, out float outHeight) + 0x9e 字节 [Appdomain 过渡]