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 Ramesh,
I took the suggestions from the previous reply and tried to reproduce the problem on 3 machines with different configurations. Here is what I found:
Machine 1: Windows XP 32-bit, SP3 - crash. (See attached Machine1.txt)
Machine 2: Windows 7 - no crash.
Machine 2: Windows XP running in a VM installed on Machine 2, 32-bit, SP3 - no crash.
Just a side note, Machine 2 is one of our machines in the server rack, so it is very powerful. Apparently, it didn't crashed there.
I have also tried to run the application on a different machine (Machine 3) with newer hardware configuration but the same OS (Windows XP 32bit SP3) and 4G RAM, that one too crashed.
So my conclusion is the problem may have something has to do with the hardware configuration. Maybe not enough memory, because the exception that I got was an out of memory exception.
Thank you.
It sounds like it could be an issue with the video driver. There is a similar reported issue on MS Connect here.
Hello Pink
I created a sample app using the file MainWindow.txt that you attached, but i am unable to reproduce this issue. Could you send information related to your environment (machine (XP/Vista...), RAM, CPU (Dual core etc.),32/64 bit, screen resolution, window transparency in your code, video driver, video card, video acceleration etc.) which would help reproduce this issue ? If you could attach a sample app that would be great.
Thanks
Ramesh
Hello,
Can you provide more details on the machine that has this exception. I would like to know what the OS is, if it is 32 or 64 bit. I would also like to know what video card and video driver are being used.
Let me know if you have any questions with this matter.