I'm working on application that needs to be able to run on a high resolution monitor (2550x1440). One or our WPF controls uses the XamDockManager. When this control is displayed in size 2400x1200 or larger, a redocking action will cause the system to crash due to an out of memory exception.
To isolate the problem, I have created a test application with nothing but a XamDockManager sitting in a large MainWindow.xaml. I was able to reproduce the crash with the same exception signature.
The exception tracing is shown below. The test MainWindow.xaml is attached to this post. If anybody have ran into the same problem and found a fix for it, please share. Thank you.
--------------------------------------------------------------------------
Exception:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Media.MediaContext.CompleteRender() 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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.Show() at Infragistics.Windows.Controls.ToolWindowHostWindow.Show(Boolean activate) at Infragistics.Windows.Controls.ToolWindow.ShowInToolWindowHostWindow(Boolean activate, Window owningWindow) at Infragistics.Windows.Controls.ToolWindow.ShowImpl(FrameworkElement owner, Boolean activate) at Infragistics.Windows.Controls.ToolWindow.Show(FrameworkElement owner, Boolean activate, Boolean preferPopup) at Infragistics.Windows.DockManager.DockManagerUtilities.ShowToolWindow(ToolWindow window, FrameworkElement owner, Boolean activate) at Infragistics.Windows.DockManager.Dragging.DragManager.ShowDropPreview(FrameworkElement owner, DropPreviewTabLocation location, Size size, HorizontalAlignment horzAlign, VerticalAlignment vertAlign, Double offsetX, Double offsetY, PaneLocation targetLocation) at Infragistics.Windows.DockManager.Dragging.DragManager.ShowDropPreview(FrameworkElement owner, DropPreviewTabLocation location, Nullable`1 sideForNone, Size size, Double offsetX, Double offsetY, PaneLocation targetLocation) at Infragistics.Windows.DockManager.Dragging.DragManager.ShowDropPreview(FrameworkElement owner, Dock side, Size size, Double offset, PaneLocation targetLocation) at Infragistics.Windows.DockManager.Dragging.AddToGroupActionBase.PerformAction(DragManager dragManager, Boolean isPreview) at Infragistics.Windows.DockManager.Dragging.DragManager.ProcessDragMove(IInputDeviceInfo e, Nullable`1 windowRect) at Infragistics.Windows.DockManager.Dragging.DragManager.ProcessDragMove(MouseEventArgs e) at Infragistics.Windows.DockManager.Dragging.DragManager.OnDragElementMouseMove(Object sender, MouseEventArgs e) at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run()
----------------------------------------------
Hello,
Thank you for responding. We were using Infragistics' software in our previous prototyping project. We have now moved on to another project with a different technology and thus and no longer using Infragistics' software.
Thanks,
-Jillian
There was an issue where dragging a retemplated ContentPane caused a NullReferenceException with the same stack trace. This exception was being thrown in that case because the retemplated ContentPane had a menu within the PaneHeaderPresenter that was getting focus and this also captured the mouse which took the focus away from the drag operation. Internally we addressed the exception in the control so that the drag operation is just terminated as there isn't anyway to know if capturing the mouse should be done.
In the case of the menu the solution was to modify the customized PaneHeaderPresenter so that the menu wouldn't take focus.
Let me know if you have any questions with this matter.
I am using InfragisticsWPF4.V11.1 dlls and XamDockManager crashes while draging the contentpane controls
[****START****][2012-02-28 13:08:25,455] [demo][1] Message: Object reference not set to an instance of an object.
Source: InfragisticsWPF4.DockManager.v11.1
TargetSite: Void ProcessDragMove(IInputDeviceInfo, System.Nullable`1[System.Windows.Rect])
StackTrace: at Infragistics.Windows.DockManager.Dragging.DragManager.ProcessDragMove(IInputDeviceInfo e, Nullable`1 windowRect)
at Infragistics.Windows.DockManager.Dragging.DragManager.ProcessDragMove(MouseEventArgs e)
at Infragistics.Windows.DockManager.Dragging.DragManager.OnDragElementMouseMove(Object sender, MouseEventArgs e)
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at EFI.Monarch.FrameV2.App.Main() in E:\Monarch_CSV_Code\MS_VS_2010\Monarch.Client\EFI.Monarch.FrameV2\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Pink,
I wanted to follow up that the highest resolution I was able to test at was 1920x1080 which is less than the resolution of the monitors that you have. Since the issue is specific to two cards using the same video driver you should follow up with nVidia as the issue is only reproducible with those cards. Please post any resolution that nVidia may have here as well.
I was able to test on a machine with a video card that uses the same driver and this didn't reproduce the issue. The machine I tested with had a nVidia Quadro FX 570M video card in it. It is likely that this card isn't capable of the same resolutions and that would account for not being able to reproduce this.
Since this issue is related to a specific video driver, I would also recommend that you reach out to nVidia as well with the issue to see if they can help with this.