WPF - DUCE.Channel.SyncFlush() - Insufficient memory to continue the execution of the program.

Frage WPF - DUCE.Channel.SyncFlush() - Insufficient memory to continue the execution of the program.

  • Dienstag, 29. September 2009 15:02
     
     

    Experts, please advice.

    I have a WPF application developed using Visual Studio 2008 + DotNET 3.5.
    It creates couple of translucent windows when users drag Windows from one monitor to another in multi-monitor scenario. It works fine in two monitor scenario and three monitor scenario. In four monitor scenario, I get the following error consistently when the application tries to render the borderless translucent windows on the screen.

    Environment: Windows 2003 R2 SP2, remote session via Citrix ICA protocol.

    20:16:53.5935 [T-1] DEBUG App.Application_DispatcherUnhandledException() - Insufficient memory to continue the execution of the program.
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Media.Composition.DUCE.CompositionTarget.UpdateWindowSettings(ResourceHandle hCompositionTarget, RECT windowRect, Color colorKey, Single constantAlpha, MILWindowLayerType windowLayerType, MILTransparencyFlags transparencyMode, Boolean isChild, Boolean isRTL, Boolean renderingEnabled, Int32 disableCookie, Channel channel)
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget)
       at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
       at System.Windows.Interop.HwndTarget.HandleMessage(Int32 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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

    Any insight will be of great help.

    Thanks,


    Kannan

Alle Antworten

  • Mittwoch, 19. Januar 2011 14:16
     
     

    Anyone have a soluntion for the error above I am getting the same error with WPF Framework 4

    Application.Application_DispatcherUnhandledException Message: Insufficient memory to continue the execution of the program.
    Source: PresentationCore
    Stack Trace: at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) 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)

  • Donnerstag, 10. März 2011 18:35
     
     

    I can try guessing. (Shot in the dark)

    Stuff I know:

    • transparent windows are made possible by WS_EX_LAYERED
    • Layered windows were designed for small uses, like drag-drop icons that appear transparent while being dragged to their target
    • Layered windows were not designed to be big, or host major functionality
    • Drawing into a layered window involves assembling the frame, creating a bitmap of that frame, then copying it into the device context of the layered window (expensive).
    My guess:
    • You're out of video memory.
    • The video card(s) have reserved enough space for each monitor.
    • When you try to copy the bitmap representation of your layered window from one monitor to another, the extra video memory required for the copy is what pushes you past your video card's limit

  • Montag, 14. Mai 2012 07:43
     
     

    Can I ask you, if you find out any solution for this issue?

    Thank for any advice.

    Best Regards,

    Rostislav Nunvář

  • Freitag, 18. Mai 2012 14:16
     
     
    When I've seen this error, it is typically related to the video driver; do you have the latest / greatest installed?
  • Mittwoch, 6. Juni 2012 09:35
     
     
    Yes, at the first, I had problem with random restart PC. This issue I solved, that I reinstall graphic driver to latest version. Now I have problem with error above...:( I use industrial PC EPI-QM57 (Avalue). Could somebody help me?