locked
Not enough storage is available to process this command RRS feed

  • Question

  • I have developed an application C#/.Net 4.0/WPF VS2010.

    I have removed all found memory leaks in my WPF/.Net/C# app but it still crashes (effectively disabling Windows until the app is cleared).  The underlying exception is 'Not enough

    storage is available to process this command' possibly on a hWnd.ctor.  I have a sneaking suspicion I am leaking handles but ANTS and Task Manager seem blithely unaware of any

    issue.

    If you offer any advice as to how I might diagnose this issue I would be most grateful!

    Many thanks.

    AndyF.

    Friday, August 24, 2012 9:16 AM

Answers

  • Hi AndyF,

    Thank you for posting in the MSDN forum.

    I’m afraid that it is not the correct forum, since this forum is to discuss the VS debugger tool issue.

    'Not enough storage is available to process this command'

    Based on the error message, like this MSDN document it seems that you would try to increase the Virtual Memory size, and then check it again.

    Reference:

    Change the size of virtual memory. Hope it could help.

    As you said it has this issue when you develop a WPF app, if still no help, I suggest post this issue in the WPF forum for dedicated support. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 27, 2012 2:56 AM

All replies

  • I have developed an application C#/.Net 4.0/WPF VS2010.

    I have removed all found memory leaks in my WPF/.Net/C# app but it still crashes (effectively disabling Windows until the app is cleared).  The underlying exception is 'Not enough

    storage is available to process this command' possibly on a hWnd.ctor.  I have a sneaking suspicion I am leaking handles but ANTS and Task Manager seem blithely unaware of any

    issue.

    If you offer any advice as to how I might diagnose this issue I would be most grateful!

    Many thanks.

    AndyF.

    Friday, August 24, 2012 9:15 AM
  • Hi AndyF,

    Thank you for posting in the MSDN forum.

    I’m afraid that it is not the correct forum, since this forum is to discuss the VS debugger tool issue.

    'Not enough storage is available to process this command'

    Based on the error message, like this MSDN document it seems that you would try to increase the Virtual Memory size, and then check it again.

    Reference:

    Change the size of virtual memory. Hope it could help.

    As you said it has this issue when you develop a WPF app, if still no help, I suggest post this issue in the WPF forum for dedicated support. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 27, 2012 2:56 AM
  • Hi Jack

    I was hoping someone might be able to advise me as to how I might investigate my issues using VS tools.

    Thanks anyway.

    Tuesday, August 28, 2012 7:25 AM
  • Hi AndyF,

    I doubt that it is not the VS tool issue, and maybe you could try to check it in other machine with the same windows configuration.

    As my previous reply, if still no help when increasing the Virtual Memory size, I’m afraid that I didn’t have the good solution, since it is not the VS debugger tool issue, I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.

    My suggestion is that if it has this issue with the specific WPF app, the WPF forum will be better.  

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, August 28, 2012 8:39 AM
  •  

    Thank you for the suggestions and assistance.

    None of the ANTS or SysInternals tools could identify any type of leak.  The bug was found by comparing similar sections of code in similar classes in the programme.

    The system consists of a WPF client running hardware via a USB HID-style driver.  The hardware sub-units are controlled by applying/listening to changes in C# models (generated using xsd.exe on XSD definitions of the 'shape' of the hardware) and passing commands to, and listening to events from, the driver.

    One sub-system is a precision 2-D stage which, when in motion, updates it's position ~10Hz.  There are other events occurring also in the same controller class which 'owns' the C# model.  These events cause changes in the model which fires property change events.  These events fire a property changed event handler.

    At the end of the handler the code calls:

    CommandManager.InvalidateRequerySuggested();

    If this line is commented out the crash is obviated.  I am sure there are good reasons why this function should not be called repeatedly, in fast succession or concurrently, and probably on different threads and I shall leave the determination of those to the reader!

    Thanks again

    AndyF.

    Tuesday, September 4, 2012 12:31 PM