none
WPF app fails to start second time ?

    Question

  •  

    We have a WPF app with about 400 users.  One user, who has a high end machine ( 2 gig of RAM, good video card, etc ), reports that if he starts the app on boot, closes it and restarts it, it blows up.  That is to say, at any point if he runs it a second time, it fails, even if he does it all right away.  Here is the stack trace:

     

    Not enough quota is available to process this command
       at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, List`1 channelList)
       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)

     

    We have our own logging in the app, I know for sure that the constructor for te MainWindow is completed, or in this code:

     

    bool current = OvsUtility.GetInterfaceAnimalPanel().DualOverlaysOn;

    singleOverlay.IsChecked = !current;

    dualOverlay.IsChecked = current;

     

    singleOverLay and dualOverlay are menu items, GetInterfaceAnimalPanel just returns an inner control from a user control.

     

    We have no logging after this code, but we have logging the moment the Load event fires on the Main Window, and this code is not running, so the exception occurs in the above code, OR between the constructor and the Load event. 

     

    I assume it's something to do with his machine, as no-one else has the issue, but it's not low specced, so that's not it.  Where do I look next ?

     

    Sunday, May 18, 2008 3:44 AM
    Moderator

All replies

  •  

    *bump*
    Sunday, May 18, 2008 9:06 PM
    Moderator
  • Hey cgraus,

    Did you manage to find out the cause of this error?

    I'm running a WPF app on a Vista machine (pre-SP1) and I occasionally get this error when launching a standalone Java app where it causes an exception on:

    MS.Win32.UnsafeNativeMethods.PostMessage

    but I've also seen it on:
    MS.Win32.UnsafeNativeMethods.SetFocus

    and it gives me the same error:
    Not enough quota is available to process this command

    I can see that my C: drive has Disk Quota management disabled.....not really sure what else to try here.
    Thursday, June 19, 2008 8:49 PM
  • We have the same problem occasionally happening when starting our WPF/MFC interop application. Did you happen to find a solution. What does the "not enough quota" thingy mean anyway? And how can WPF be involved with this?
    http://bitbonk.spaces.live.com
    Tuesday, January 27, 2009 3:08 PM
  • Hey Christian,

    We have a WinForms + WPF application, and we just received this same error:

    Not enough quota is available to process this command.
    
    Stacktrace:
    at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    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)
    at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at MS.Win32.SafeNativeMethods.SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
    at System.Windows.Forms.Integration.ElementHost.SetHWndSourceWindowPos()
    at System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    NativeErrorCode=1816 (0x718)
    ErrorCode=-2147467259 (0x80004005)
    Data=System.Collections.ListDictionaryInternal



    Did you ever find the cause of this issue, or any workarounds to this problem?



     
    Tech, life, family, faith: http://judahgabriel.blogspot.com
    Tuesday, September 29, 2009 2:39 PM
  • This seems to happen to quite a lot of people Maybe this should be reported as a bug?
    http://bitbonk.spaces.live.com
    Wednesday, September 30, 2009 6:16 AM
  • Is there a bug filed?
    Tuesday, October 19, 2010 4:39 AM
  • *bump*
    Monday, March 28, 2011 8:41 PM
  • Did anyone find a solution to this problem? 

    Tuesday, August 06, 2013 4:46 PM
  • I have the exact same call stack.  Did you find a solution to this problem?

    gunderzac

    Friday, September 06, 2013 6:14 PM