如何使很少发生的WPF异常更频繁地重现?

时间:2018-10-18 19:37:38

标签: wpf virtualizingstackpanel ui-virtualization

这时将没有最小的可复制示例,因为我最多可以每天一次并且仅使用产品主窗口(仅在多个控件中包含数千个xaml行)重现此示例。

我正在调查另一个WPF导致的崩溃,当主窗口被调整大小或程序认为其被调整大小时可能发生(WM_SIZE)。 stacktrace中的控件是虚拟的Treeview。所以我问是否有想法如何使下面的异常更常见?

例外

2018-10-17 14:23:33: [traced at 17.10.2018 14:23:33] myprogram.exe Error: 0 : Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.Controls.TreeViewItem.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeItemsBeyondTheExtendedViewport(Boolean isHorizontal, UIElement child, Size childDesiredSize, Double arrangeLength, IList items, IItemContainerGenerator generator, IContainItemStorage itemStorageProvider, Boolean areContainersUniformlySized, Double uniformOrAverageContainerSize, Boolean beforeExtendedViewport, Rect& rcChild, Size& previousChildSize, Point& previousChildOffset, Int32& previousChildItemIndex)

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.ScrollContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.Controls.ScrollViewer.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MyCompanySDK.Features.Panels.LinearLayoutPanel.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)

   at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2018-10-17 14:23:33: [traced at 17.10.2018 14:23:33] xpower.exe Error: 0 : Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.Controls.TreeViewItem.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeItemsBeyondTheExtendedViewport(Boolean isHorizontal, UIElement child, Size childDesiredSize, Double arrangeLength, IList items, IItemContainerGenerator generator, IContainItemStorage itemStorageProvider, Boolean areContainersUniformlySized, Double uniformOrAverageContainerSize, Boolean beforeExtendedViewport, Rect& rcChild, Size& previousChildSize, Point& previousChildOffset, Int32& previousChildItemIndex)

   at System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.ScrollContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.Controls.ScrollViewer.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at Fusion.Features.Panels.LinearLayoutPanel.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)

   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Decorator.ArrangeOverride(Size arrangeSize)

   at System.Windows.Documents.AdornerDecorator.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.Window.ArrangeOverride(Size arrangeBounds)

   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

   at System.Windows.UIElement.Arrange(Rect finalRect)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Interop.HwndTarget.OnResize()

   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2018-10-17 14:23:51: Error: exception c0000005: EXCEPTION_ACCESS_VIOLATION: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

1 个答案:

答案 0 :(得分:1)

  1. 有时使用ctrl + alt +箭头来旋转窗口,或使用Windows按钮+箭头来捕捉窗口会有所帮助。或像疯子一样最小化/最大化。

  2. 要调试该问题,请尝试:工具->选项->调试-> OutputWindows,WPF跟踪设置,将详细程度切换到最大。您可能会看到在异常发生之前记录的非常有用的错误。