Я занимаюсь этим в течение длительного времени. Иногда он выдает недопустимое исключение операции, иногда из памяти. Случайные пользователи могут работать в течение нескольких дней и кратковременно срабатывать в течение одного дня.Приложение WPF случайно падает с исключением OOM
Я получил стек вызовов от одного пользователя и не могу понять, что может быть причиной этого. Это приложение WPF с богатым пользовательским интерфейсом. Множество просмотров, списков. Использование PRISM и регионов.
Он также использует потоки фона для прослушивания по TCP, обновляет данные и отправляет уведомление PRISM о потоке пользовательского интерфейса для обновления. Этот стек дает какие-то сведения о том, что мне нужно проверить? Это не происходящий в моем коде ..
в MS.Utility.ArrayItemList
1[[System.Windows.Freezable+FreezableContextPair, WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]..ctor(Int32) at MS.Utility.FrugalObjectList
1 [[System.Windows.Freezable + FreezableContextPair, WindowsBase, Version = 4.0.0.0, культура = нейтральной, PublicKeyToken = 31bf3856ad364e35 ]]. set_Capacity (Int32) в MS.Utility.FrugalObjectList`1 [[System.Windows.Freezable + FreezableContextPair, WindowsBase, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35]]. Вставить (Int32, FreezableContextPair) at System.Windows.Freezable.AddContextToList (System.Windows.DependencyObject, System.Windows.De pendencyProperty) при System.Windows.Freezable.AddContextInformation (System.Windows.DependencyObject, System.Windows.DependencyProperty) при System.Windows.Freezable.AddInheritanceContext (System.Windows.DependencyObject, System.Windows.DependencyProperty) в System.Windows.DependencyObject.ProvideSelfAsInheritanceContext (System.Windows.DependencyObject, System.Windows.DependencyProperty) при System.Windows.Freezable.OnFreezablePropertyChanged (System.Windows.DependencyObject, System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.Media.RenderData.PropagateChangedHandler (System.EventHandler, булева) при System.Windows.UIElement.RenderClose (System.Windows.Media.IDrawingContent) на System.Windows.Media.VisualDrawingContext.CloseCore (System.Windows.Media.RenderData) в System.Windows.Media. RenderDataDrawingContext.DisposeCore() в System.Windows.Media.DrawingContext.System.IDisposable.Dispose() в System.Windows.Media.RenderDataDrawingContext.Close() в System.Windows.UIElement.Arrange (System.Windows.Rect) при System.Windows.Controls.DataGridCellsPanel.ArrangeChild (System.Windows.UIElement, Int32, ArrangeState) в System.Windows.Controls.DataGridCellsPanel.ArrangeOverride (System.Windows.Size) в System.Windows.FrameworkElemen t.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) в MS.Internal.Helper.ArrangeElementWithSingleChild (System.Windows.UIElement, System.Windows.Size) на System.Windows.Controls.ItemsPresenter.ArrangeOverride (System.Windows.Size) в System.Windows.FrameworkElement.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) при System.Windows.Controls.Control.ArrangeOverride (System.Windows.Size)
на System.Windows.Controls.Primitives.DataGridCellsPresenter.ArrangeOverride (System.Windows.Size) в System.Windows.FrameworkE lement.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) в System.Windows.Controls.Grid.ArrangeOverride (System.Windows.Size)
в System.Windows.FrameworkElement.ArrangeCore (System. Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) при System.Windows.Controls.Border.ArrangeOverride (System.Windows.Size)
в System.Windows.FrameworkElement.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) при System.Windows.Controls.Control.ArrangeOverride (System.Windows.Size)
в System.Windows.Controls.DataGridRow.ArrangeOverride (System.Windows.Size) в System.Windows.FrameworkElement.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement.Arrange (System.Windows.Rect) в System.Windows.Controls.VirtualizingStackPanel.ArrangeOtherItemsInExtendedViewport (Boolean, System.Windows.UIElement, System.Windows.Size, Double, Int32, System.Windows.Rect ByRef, System.Windows.Size ByRef, System.Windows .point ByRef, Int32 ByRef) при System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride (System.Windows.Size) на System.Windows.FrameworkElement.ArrangeCore (System.Windows.Rect)
в System.Windows.UIElement .Arrange (System.Windows.Rect) при System.Windows.ContextLayoutManager.UpdateLayout() в System.Windows.ContextLayoutManager.UpdateLayoutCallback (System.Object) на System.Windows.Media.MediaContext + InvokeOnRenderCallback.DoWork()
на System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
в System.Windows.Media.MediaContext.RenderMessageHandlerCore (System.Object) на System.Windows.Media.MediaContext.RenderMessageHandler (System.Object) на System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) в MS.Intern al.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate) при System.Windows.Threading.DispatcherOperation.InvokeImpl() в System.Windows.Threading.DispatcherOperation. InvokeInSecurityContext (System.Object) на System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) при System.Threading.ExecutionContext.Run (System.Threading. ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) в System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) в System.Windows.Threading.DispatcherOperation.Invoke() в System.Windows.Threading.Dispatcher.ProcessQueue() в System.Windows.Threading.Dispatcher.WndProcHook (IntPtr, Int32, IntPtr, IntPtr , булева ByRef) в MS.Win32.HwndWrapper.WndProc (IntPtr, Int32, IntPtr, IntPtr, булева ByRef) при MS.Win32.HwndSubclass.DispatcherCallbackOperation (System.Object) при System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) при MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate) в System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) в MS.Win32.HwndSubclass.SubclassWndProc (IntPtr, Int32, IntPtr, IntPtr)
в MS.Win32.UnsafeNativeMethods.DispatchMessage (System .Windows.Interop.MSG ByRef) при System.Windows.Threading.Dispatcher.PushFrameImpl (System.Windows.Threading.DispatcherFrame) на System.Windows.Threading.Dispatcher.PushFrame (System.Windows.Threading.DispatcherFrame) на System.Windows.Threading.Dispatcher.Run() на System.Windows.Application.RunDispatcher (System.Object) на System.Windows.Application.RunInternal (System.Windows.Window) на System.Windows.Application.Run (System.Windows.Window) в ArturExpress.Main.App.Main()
Я бы рекомендовал использовать некоторый профилировщик, чтобы узнать, что на самом деле происходит.Из этого описания действительно трудно угадать ... – walther
Каково фактическое исключение, для которого используется стек? Это исключение OutOfMemoryException или что-то еще? Кроме того, существуют ли какие-либо внутренние исключения? – user469104
К сожалению, я не могу ее проследить. Он не воспроизводится, происходит случайно на компьютерах пользователей (может продолжаться нормально в течение нескольких дней). Эта трассировка стека поступает из журнала событий. Это OutOfMemoryException. – katit