Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

We’ve received several reports of an occasional issue occurring with VS 2010 when developers try and do “Cut” or “Copy” text operations of text.  In some cases VS incorrectly calculates that not enough memory is available (even though there is memory available) and displays the following error message:

"Insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation. Please try again later."

There is now a public patch available for this issue which you can download and apply here if you are running into it.  More details on the issue can be found on the Visual Studio team blog here.

Hope this helps,

Scott

P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. You can follow me at: twitter.com/scottgu

Published Sunday, June 27, 2010 3:03 PM by ScottGu

Comments

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Sunday, June 27, 2010 6:51 PM by Liam

Thanks Scott and the VS team

We have previously used Steve Harman's 2gb+ VS2008 hack on VS2010 to get around these errors, which were showing up very frequently (every 30 minutes or so). Hopefully this patch will mean that we don't have to hack anymore.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Sunday, June 27, 2010 7:36 PM by David Clegg

I haven't run into that particular issue, but cut/copy+paste occasionally stops working for me in the code editor, requiring an IDE restart to fix. Do you know whether this fix could also possibly apply to the issues I'm having, or is the fix specifically for the condition indicated by the "Insufficient available memory..." error.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Sunday, June 27, 2010 9:39 PM by Scott Marlowe

I've been experiencing and blogging about this issue for some time (www.itscodingtime.com/.../Insufficient-available-memory-to-meet-the-expected-demands-of-an-operatione280a6.aspx). Glad Microsoft got the hot-fix out. I've got it installed, but need to run VS some more before I can say it's fixed for me or not.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Sunday, June 27, 2010 10:47 PM by Sean Laberee

@David Clegg: This fix is not intended to address the issue that you are experiencing. We are investigating an issue which sounds very similar to the one that you have reported where a copy from Visual Studio can cause the clipboard data to be corrupted if another application (such as Remote Desktop) is also watching the clipboard.  If you are seeing this issue, you will be unable to paste that data into any application. The reports that I have seen indicated that you can workaround this by simply copying again (without the need to restart).  

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Sunday, June 27, 2010 11:07 PM by Adrian

Scott,

It is great that the cut\past bug has been fixed, however some may consider this to be less of a bug, but more of a feature!! Not a bad feature at that.

However, the bug that is really annoying me and my colleagues on a day to day basis is the VS2010 crashing whenever you lock Windows XP bug.

I work at a bank, so not locking my computer when I walk away is not negotiable.  By the time I get to the end of the day and I have spend a large chunk of it loading solution files, I am very frustrated.

Link - connect.microsoft.com/.../locking-windows-xp-workstation-crashes-and-restarts-vs-2010-beta-2

Anyway, keep up the good work.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 1:11 AM by Leifre

You might want to mention that after installing the update, you will have to reinstall Silverlight 4 tools in your doing silverlight development.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 5:03 AM by xu

thanks

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 6:14 AM by Mannequin

This issue is an excellent solution to code Copy/Paste problem. I think that developer should resolve this issue with resolution "won't fix" :)

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 9:07 AM by Yoav

Oh, thank you so much for the patch!

I wasnt sure whether this was due to my machine or a VS issue.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 9:16 AM by Paul

@Leifre

Is that really necessary?  I didn't see it mentioned anywhere

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 12:10 PM by steve

something similar happened when copying a websites html and trying to format it.  no error just crashed.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 5:04 PM by bbehrens

@steve:  The bug addressed by this hotfix shouldn't cause a crash.  What you're seeing probably has a different root cause, so I'd encourage you to file a Connect bug with as much information as you have (a crash dump would be especially helpful).  The bug will then be routed to the Visual Studio product team for investigation.  Here's the link:  connect.microsoft.com/visualstudio.

- Brittany Behrens, Program Manager, VS Editor team

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 6:19 PM by Rob Relyea

@Adrian-

Please review today's replies on that connect bug...and interact via that connect issue with us.

Thanks, WPF Team

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Monday, June 28, 2010 8:09 PM by Ted Morris Dawson

Hmmm... on a related note? I got an "insufficient resources available" message when using Test Manager to record some test steps, even though the test recorded and played back OK. I'll try this patch and see what happens... :)

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, June 29, 2010 1:57 AM by Leifre

Paul, yea...I am doing silverlight 4 development and been having that cut n paste issue.  So, i installed the hotfix and as soon as i opened the solution with a silverlight 4 project it vs2010 started throwing errors on each sl4 linked project that i needed Silverlight 4 Tools installed.  They had been installed but i guess this hotfix messed it up a bit.  Reinstalling the Silverlight 4 tools works fine though.  The whole process of installing the patch and then Silverlight 4 tools takes a bit longer than your typical hotfix tho ;)

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, June 29, 2010 3:55 AM by AlfeG

Thanks ) This thing were killing me.

When You guys fix extension manager? It's not working under proxy without authorization(sending "anonymous" login).

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, June 29, 2010 6:47 AM by kamii47

Thanks atleast for providing the patch

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, June 29, 2010 3:09 PM by bbehrens

@Ted Morris Dawson:  This hotfix is very targeted and modifies a code path that's only hit when copying text from the editor.  Though it's possible that the Test Manager was doing a copy operation from the editor, it's more likely that the root cause is different.  If the patch doesn't solve the problem, I'd encourage you to file a Connect bug so we can investigate.   Here's the link:  connect.microsoft.com/visualstudio.

@AlfeG:  I've asked the team that owns the Extension Manager to take a look at your comment.  You should see a response from them in this comment stream soon.

- Brittany Behrens, Program Manager, VS Editor team

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, June 29, 2010 4:35 PM by David Ching

Thanks for this fix.  Please now focus on fixing the bug where copy/paste with Ctrl key fails silently as this is a major productivity hit:

connect.microsoft.com/.../copy-paste-bug

Thanks,

David

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Wednesday, July 07, 2010 10:03 AM by Paul

Any fix available for the Xap packaging failed error? Everyone on my team is getting the same error after 1 or 2 compiles and it seems to have gotten worse the larger our VS2010 project has gotten.

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Wednesday, July 07, 2010 3:29 PM by ScottGu

@Paul,

>>>>>>>> Any fix available for the Xap packaging failed error? Everyone on my team is getting the same error after 1 or 2 compiles and it seems to have gotten worse the larger our VS2010 project has gotten.

Can you send me email (scottgu@microsoft.com) about this and I'll connect you up with someone on the team to get resolved.

Thanks,

Scott

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Tuesday, July 27, 2010 4:48 AM by hfrmobile

Wow ... I am really surprised that such basic stuff like "Copy&Paste" sometimes not works with VS2010 ...

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Thursday, August 12, 2010 3:46 AM by lennyrawles

Umm, has anybody ever beaten Scott to anything?

# re: Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Wednesday, August 25, 2010 10:47 PM by Alicia

Thanks for the link - works like a charm.