Not enough memory resources are available to complete this operation (WorkflowDesigner) RRS feed

  • Question

  • Sometimes, when create WorkflowDesigner object, "Not enough memory resources are available to complete this operation" exception occurred. At this time, ~5 GB of memory was free in system RAM.

    Different operations such as Workflow Load, Save etc are performed before that. 

    XamlServices.Save(path, loadedActivity);
    wfDesigner = new WorkflowDesigner();
    feedback = Dispatcher.BeginInvoke((Action)delegate
                    ((RoutedCommand)DesignerView.FitToScreenCommand).Execute(null, wfDesigner.Context.Services.GetService<DesignerView>());
    }, DispatcherPriority.Background);

    System information:

    OS :Windows 10 x64 10.0.17763 (1809)

    System : Dell OptiPlex 7060

    RAM: 16 GB

    Processor: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, 3192 Mhz, 6 Core(s), 12 Logical Processor(s)

    Stack trace:

    Type : System.ComponentModel.Win32Exception, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message : Not enough memory resources are available to complete this operation
    Source : System.Core
    Help link :
    NativeErrorCode : 14
    ErrorCode : -2147467259
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void EtwRegister()
    HResult : -2147467259
    Stack Trace : at System.Diagnostics.Eventing.EventProvider.EtwRegister()
       at System.Diagnostics.Eventing.EventProvider..ctor(Guid providerGuid)
       at System.Activities.Presentation.DesignerPerfEventProvider..ctor()
       at System.Activities.Presentation.WorkflowDesigner..ctor()

    • Edited by Vineeth B Friday, November 15, 2019 7:33 AM
    Friday, November 15, 2019 7:05 AM

All replies

  • Hi,
    I think Dispatcher.BeginInvoke and Execute makes a recursive call.

    Best Regards / Viele Grüße
    Peter Fleischer (former MVP for Developer Technologies)
    Homepage, Tipps, Tricks

    • Proposed as answer by noorbakhsh Wednesday, November 20, 2019 9:50 PM
    Friday, November 15, 2019 6:24 PM

  • Hi,

    Thanks for the reply.

    We are not directly calling any method recursively.

    Wednesday, November 20, 2019 1:15 PM
  • Hi,

    The issue often occurs when it is not available due to the large amount of RAM memory available. You can try restarting Visual Studio to solve the problem or try to close some running applications. You can also try adding more RAM to your computer or adding page files.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, November 22, 2019 7:41 AM