5

我正在运行一个具有多个任务的 winrt 程序。在运行过程中,我得到以下异常:

Not enough quota is available to process this command

堆栈跟踪是

   at Windows.UI.Core.CoreDispatcher.InvokeAsync(CoreDispatcherPriority priority, InvokedHandler freeThreadedCallback, Object sender, Object context)
   at System.Threading.WinRTSynchronizationContext.Post(SendOrPostCallback d, Object state)
   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.InvokeOrPostAction(Object state)
   at System.Threading.Tasks.AwaitTaskContinuation.RunInline(ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.AwaitTaskContinuation.<ThrowAsyncIfNecessary>b__1(Object s)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

然后它崩溃了。

这是 WintRT 特有的问题吗?

有解决方法吗?

4

1 回答 1

2

根据该错误消息的 MSDN 文档,该错误的修复方法是“关闭某些应用程序”或“增加页面文件的大小”。

鉴于此,您可能希望首先查看任务管理器,看看您的应用程序是否使用了完全不合理的内存量(或者是否有其他进程使用)。如果您的进程存在内存泄漏,则可能会导致此问题。

于 2012-04-14T20:53:47.697 回答