OutOfMemoryException Again...

Love Resharper 4, but am at the end of my rope with System.OutOfMemoryExceptions.

RIght now, on my laptop, my devenv.exe process is using 900,000K of memory.

Any suggestions: Running VS 2008, with VS 2008 SP1 BETA.

===========================================================

Edited by: Rob Vettor on Aug 14, 2008 7:46 PM

14 comments

Start out with what Brian recommended, but if you start bumping into problems again: bear in mind that on a 32 bit system each AppDomain is limited to 800MB of memory unless you throw the /3GB switch, mark devenv.exe as LARGEADDRESSAWARE, etc. The alternative is to go 64bit.

Speaking of which, are you on 32 or 64?

0

Is this 900MB virtual or physical? The "Mem Usage" column of Task Manager or
the "VM Size"?

--
John

"Rob Vettor" <robvettor@hotmail.com> wrote in message
news:15983925.30731218726942841.JavaMail.jive@app4.labs.intellij.net...

Love Resharper 4, but am at the end of my rope with
System.OutOfMemoryExceptions.

>

RIght now, on my laptop, my devenv.exe process is using 900,000K of
memory.

>

Any suggestions: Running VS 2008, with SP1 BETA.

>

===========================================================


0

I love Resharper but these OutOfMemoryExceptions are driving me crazy. On average with a team of 6 people, each of us receives at least 6 to 8 a day. Trying to show off to other teams the new hotness that Resharper can bring isn't very effective when it crashes VS in the middle of the demonstration. No really, I promise it makes you more productive even though at least every hour you'll need to close and reopen Visual Studio...

0

Corey, can you provide any further details regarding your situation? Size of solution (number of projects, number of files, lines of code, largest file size), types of projects, memory utilized by VS when OOM starts popping up, system information (number of cores, physical memory, OS version, 32 versus 64 bit), etc.?

0

Please could you try the following:
http://www.jetbrains.net/confluence/display/ReSharper/OutOfMemoryException+Fix

--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


"Corey Kaylor" <corey@kaylors.net> wrote in message
news:28622365.18011224344376813.JavaMail.jive@app4.labs.intellij.net...
>I love Resharper but these OutOfMemoryExceptions are driving me crazy. On
>average with a team of 6 people, each of us receives at least 6 to 8 a day.
>Trying to show off to other teams the new hotness that Resharper can bring
>isn't very effective when it crashes VS in the middle of the demonstration.
>No really, I promise it makes you more productive even though at least
>every hour you'll need to close and reopen Visual Studio...


0

It gets the OOM Exception right around 700 - 750MB. We are all using the wrapper it hasn't seemed to help. The solution is primarily WPF, and class libraries, with 6 projects total. Lines of code 23388 total in solution.

Intel Core 2 Due T9300 2.5 GHz
4 GB RAM
32 bit
Vista Ultimate

0

That sounds like right about the spot that people tend to run into issues, memory-wise. If you are careful and willing to make a bit of effort to monitor for adverse side-effects (not that I've seen any, even after years of a small but very vocal minority crying like Chicken Little that the sky will fall if you even thing about doing this), you might want to try throwing the /3GB switch and marking devenv.exe as LARGEADDRESSAWARE. During years and years of R# use I have found this to be the only fix on a 32 bit system. Do some research into the two things I just mentioned and if you are comfortable with the idea (it's nothing major and is very easily reversible, so don't get too worried. I'm just giving my recommendation in a cautionary style so that the knee-jerk Chicken Littles don't descend upon this thread. Again. As they do with every such thread. Ugh :( ) then give it a try. I suspect you'll find that it entirely eliminates your OOM problems.

Jeremy

0

I'd like to also vent my frustration with this issue:

32 bit OS
/3GB switch is on in boot.ini.
LARGEADDRESSAWARE change made to devenv.exe
devenv.exe started using the devenv2008_wrap.exe

I would say that I always get this exception, resulting in "No Usages Found" when trying to Alt-F7 when in debug mode. Oddly even with all the above I get this exception at around 777,000 KB VM Size, so it appears that the 3GB - LARGEADDRESSAWARE is not working. Here is the exception from the log:

09:45:24.241: Thread:1: -OnBeforeLastDocumentUnlock, docCookie:29, fileName:C:\perforce\BPOSS\src3\Shipping\Configuration\AppConfig.cs, text buffer:3730389
09:45:24.257: Thread:1: EXCEPTION: Insufficient memory to continue the execution of the program.
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at EnvDTE.Window.get_ObjectKind()
at JetBrains.VSIntegration.ActionManagement.DataRules.GetPopupWindowContext(Window window) in c:\Agent\work\3f4db6fd459dabcd\Platform\src\VSIntegration\src\A
ctionManagement\DataRules.cs:line 208

0

Hello Scott,

Where do you see this OOM exceptions? ObjectKind property of EnvDTE.Window
object sometimes throws this exception (ask Microsoft why) in normal memory
condition, just to denote that it doesn't know current window type. Those
are catched and should not propagate to UI. It is recorded in log just to
know that we were not able to retrieve type of the window. AFAIR, image editor
in VS throws this exception.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> I'd like to also vent my frustration with this issue:
IR>
IR> 32 bit OS
IR> /3GB switch is on in boot.ini.
IR> LARGEADDRESSAWARE change made to devenv.exe
IR> devenv.exe started using the devenv2008_wrap.exe
IR> I would say that I always get this exception, resulting in "No
IR> Usages Found" when trying to Alt-F7 when in debug mode. Oddly even
IR> with all the above I get this exception at around 777,000 KB VM
IR> Size, so it appears that the 3GB - LARGEADDRESSAWARE is not working.
IR> Here is the exception from the log:
IR>
IR> 09:45:24.241: Thread:1: -OnBeforeLastDocumentUnlock, docCookie:29,
IR> fileName:C:\perforce\BPOSS\src3\Shipping\Configuration\AppConfig.cs,
IR> text buffer:3730389
IR> 09:45:24.257: Thread:1: EXCEPTION: Insufficient memory to continue
IR> the execution of the program.
IR> System.OutOfMemoryException: Insufficient memory to continue the
IR> execution of the program.
IR> at EnvDTE.Window.get_ObjectKind()
IR> at
IR> JetBrains.VSIntegration.ActionManagement.DataRules.GetPopupWindowCon
IR> text(Window window) in
IR> c:\Agent\work\3f4db6fd459dabcd\Platform\src\VSIntegration\src\A
IR> ctionManagement\DataRules.cs:line 208


0

Going on over a week without any out of memory exceptions. Thanks for the pointers. For others searching the forums for answers this blog post was a nice reference to fix the problem.

http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx

0

OK, I may have gone off half cocked there. It seems that this exception, as you say, is harmless. I think it happens when I "Close all windows". I just assumed it had something to do with the "No usages found" problem, which we get a lot, although that may be some kind of conflict with the Perforce add in, as it seems to happen less if we allow Perforce to update the status of all files before touching anything.

0

Hello Scott,

We would like to know more about Perforce add-in and scenario you use it,
could you please share some details? This could very well be the problem,
but we need to reproduce it as close to your configuration as possible, for
investigation. In case information is not for public, you can send me direct
email: orangy at jetbrains dot com. Thanks.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> OK, I may have gone off half cocked there. It seems that this
IR> exception, as you say, is harmless. I think it happens when I
IR> "Close all windows". I just assumed it had something to do with the
IR> "No usages found" problem, which we get a lot, although that may be
IR> some kind of conflict with the Perforce add in, as it seems to
IR> happen less if we allow Perforce to update the status of all files
IR> before touching anything.
IR>


0

Some of our details:

VS 2008 9.0.30729.1 SP
Resharper 4.1 c# Edition build 4.1.933.3

Perforce client: P4SCC/NTX86/2007.3/147477
Perforce server: Server Version: P4D/SOLARIS26/2002.2/39452 (2002/12/26)

15 Projects, 5820 .cs files

sometimes "Find Usages" will start working again if all the code windows are closed, but not always.

0

Please sign in to leave a comment.