0

I have a WPF application which was running fine in production till last week. There was no change at all but it started slowing down and crashing with below error. This is built on .NET 4.0 and is in production for many years. Any input on this is highly appreciated. Tried many ways to replicate from Dev environment but not happening at all.

    Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
   at System.Windows.DependencyObject.InsertEntry(System.Windows.EffectiveValueEntry, UInt32)
   at System.Windows.DependencyObject.SetEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(System.Windows.Media.Visual, System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)
   at System.Windows.UIElement.OnIsEnabledChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   at System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(System.Windows.DependencyProperty)

The remainder of the message was truncated.
Exception Info: System.InvalidOperationException

The user PC has only .NET 4.7 installed in it when checked. Just wondering if this could be something linked to .NET Framework version?

Arun
  • 2,217
  • 3
  • 17
  • 18
  • Do you have any relevant code that might help us find the problem? As is, this question is vague. – Abbas Jul 20 '17 at 07:19
  • Unfortunately no. I am still checking which part of code is causing this. – Arun Jul 20 '17 at 08:00
  • 1
    I have created a Connect issue at https://connect.microsoft.com/VisualStudio/feedback/details/3138410 to track this. If you are able to collect memory dumps (@codekaizen's suggestion i quite apt), would you please share it with us through the Connect link? The specific stack shown in your report may not be where the out-of-memory condition happens. – Vatsan Jul 27 '17 at 21:22
  • 1
    @Arun - were you able to get a crash dump or other actionable evidence? If so, please attach it to the Connect bug Vatsan created. We are concerned that it might be a problem with .Net 4.7, but we can't repro the problem so we need your evidence. Lacking that, we'll have to resolve the bug as NotRepro. – Sam Bent - MSFT Aug 29 '17 at 22:51
  • No actionable evidence yet unfortunately. Asked user to try a lower version of .NET as of now. Yet to get feedback. – Arun Sep 19 '17 at 13:13

2 Answers2

2

One thing you can do in production is to use procmon.exe from Sysinternals (Microsoft). You only need the exe and can run it from disk or usb drive or even network share.

You can set it up to dump process memory on an OutOfMemoryException:

procdump -ma -e 1 -f OutOfMemoryException -w "<Your Process Name>"

Alternatively you can configure it to trigger dumps when memory is beyond a threshold:

procdump -ma -m 1000 -w "<Your Process Name>" -n 20 -s 60

This sets up procdump to dump all memory (-ma) over 1000MB (-m) for the process with name <Your Process Name> (-w), taking 20 dumps (-n) with 60 seconds between each dump (-s). Comparing these can give you a good idea of your memory usage over time.

Once you have dump (.dmp) files, you can use various tools (I like .Net Memory Profiler but PerfView or WinDbg with SOS work well, too) to examine the heap memory of the dump to find out if there are objects that shouldn't be in memory. With WPF, there are typical culprits for this, and property binding (what your callstack is showing) is one of them.

codekaizen
  • 26,990
  • 7
  • 84
  • 140
-1

There are similar reports on internet about the same callstack repeating endlessly causing exceptions, you get an OutOfMemoryException but you could get a StackOverflowException or others as well.

Here are similar problems: error 1 - error 2

Unfortunately the callstack is not enough to understand where the problem origins so my recommendation is to use remote debugger on the client machine to retrieve more information about the issue.

Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
  • Thanks for the suggestion. Right now it is not clear to me as well which part of code is causing this. I will try remote debugger as you suggested. – Arun Jul 20 '17 at 08:06
  • These do not seem similar to @Arun's issue. – Vatsan Jul 27 '17 at 21:25
  • 1
    @Vatsan: they do, 95% of the callstack is the same, PropertyChanged -> InvalidateForceInheritPropertyOnChildren -> Coerce ... – Ignacio Soler Garcia Jul 30 '17 at 09:27
  • 1
    They are not the same. 1 is an OutOfRange exception due to re-entrant collection change in Intellisense, 2 is NullReference exception in Diagram fixed 5 years ago. For OutOfMemory, callstack is not necessarily relevant - just what was happening when memory ran out. Crash dump is more useful. – Sam Bent - MSFT Aug 03 '17 at 18:04