out of memory
I see that out of memory is a fairly common problem, and I'm seeing it now. I'm willing to work with support to provide memory dump, etc.
I'm on win7, 64bit, 8 GB memory. Resharper 6.1 trial version. Visual Studio 2010. About 30 projects, about 200K lines of code.
When I enable resharper it churns at 30-60% cpu until it reach about 2.5GB private working set and then dies. During this time I'm not doing anything in VS, just watching task manager with a sense of doom. <s>
Just let me know what you need.
Please sign in to leave a comment.
Hello Leo
Thank you for reporting this problem! We appreciate your desire to help us fix this problem. First of all, you can strip down your solution to a small sample that exhibits the same problem (by consequently removing projects and files while keeping the problem reproducible). It would be great if you could send the solution to me (andrew dot serebryansky at jetbrains dot com).
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
PS
I am obvioulsy NOT ALONE
I will tediously but meticulously winnow away the projects in the solution until the behavior improves. But I I have a question.
In each iteration of this process I can "resume" resharper, watch it churn away for 30 minutes to an hour or more, using 25-50% cpu and gigs of memory, and wait for it to fail. Could I cut this process short by concluding sooner that it is broken? Say, when it reaches 2GB memory? Or 15 minutes of high cpu? Or must I wait for a crash every time?
Hello Leo
Normally, memory usage growth should stop after ReSharper has loaded and code analysis for the currently opened file has finished (if you have solution-wide analysis turned off). If it doesn't and Visual Studio still uses CPU for a minute or two, then you can safely cut the process short and make next reduction step. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I've been running with "Analyze errors in whole solution". Is that the same as "solution-wide analysis"?
Is it the default? I don't remember changing it but others have touched this machine.
Should I be doing all my testing with the option turned off?
In other news, after I removed 30+ (in steps of 10) projects from my 50-project solution the memory use suddenly stabilized at about 500MB, but the cpu usage stays at 13% (1 of my 8 cpus) for 30mins before I killed it.
Andrey,
I have also been complaining of this issue for over a year, and am also very frustrated. Having a large solution with large code files in it makes Resharper completely unusable. I try every single new release hoping for a resolution. I have 35 developers that I would buy a license for immediately if we could actually use it on our solution (it's large, we want to refactor it!)
I have been in contact a couple of times, starting with version 5. Each time I get this same response that you have posted. I have always expressed my desire to help you guys work through this. Most recently I tweeted my disappointment with 6.1, and Kirill and Hadi both initially responded. However, I can never receive a follow up from you guys regarding this issue. I do not even know if Kirill downloaded my most recent dump file, as he will not respond, either by email or twitter, despite two follow-up attempts by me.
You have tickets in your tracker system from 3 years ago still open on this issue.
The communication always seems to stop at "send us your dump file, we will take a look". Can we please get a real update on this issue? If Resharper will just never work with large solutions, can you just state that?
I turned off "Analyze errors in whole solution" and the behavior is now acceptable.
I always run with it turned off ,any other situation makes R# unusable , so its a feature you use occasionally to check the state of play . Not as its designed to be an on line tool
You may as well just use StyleCop by itsself every hour or so without the R# integration, this somewhat defeats the object.
I assume your success is attributable to butch hardware and probably 64 bit processing . On a i7 / win 32/ ssd / 4Gb Ram it is still an issue as my previous posts have indicated.
Mike
Enough said
I have tried the most recent nightly build (27 Jan) and I opened one of our big Database Projects and wham , out of memory.
I have had this debate , if it won't cope with Win 32 and 4 gb of RAM the please say so and we can look for an alterative.
There is a second thread runnng on this , I simply have given up R# is uninstalled , and Jet Brains have lost my confidence, for what its worth.
Mike
Hello Leo
Thank you for this information! Now we know that this behavior is caused by the solution-wide analysis feature. Could you please describe what kinds of projects (class library, silverlight, web etc) were among those 10, removing which has helped to stabilize memory usage?
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello
I completely understand your frustration and we'll try our best to address this problem. There are numerous causes for memory problems (not only the project size) and we're trying to eliminate them one by one. Could you please tell me the names of the dump files that you've uploaded? Could you please also describe precisely what happens when you're working in Visual Studio with ReSharper enabled? How does the memory usage change and when do you get an OOM error? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi
In my case teh value of the Managed Memory in the bottom RH corner doesn't change much , its the value I see in the Task Manager that increases.
I assume the one in the VS2010 IDE is the size of the "database" of symbols etc , in that case I would not expect that to change much once a solution is loaded.
I have uninstalled now , so its diffiucclt to provide actual numbers , but from memeory its running 120- 150 MB shown in VS 2010 , comapred with the Task Manager starting at 400 and increasing to 700 and more
Mike
Hi Andrey,
Here was my most recent email to Kirill, after he and Hadi responded to my tweet re:OOME's in 6.1:
Here are my most recent tweets, asking for followup:
https://twitter.com/#!/wompeter
Here is an email from a year ago (Jan 21 2011), of which I also got no reply to. (At that point, Resharper was actually usuable for tiny windows of time, but as it stands today, I can't even compile once with our solution file).
So, I've provided descriptions of our setup, and a dump file, and I'm standing by ready to give whatever information I can provide. It might be one problem, it might be multiple separate problems - but from my perspective, it's just an unusable product at this point. I *want* to help you fix it (if it's fixable!) so I can buy it. All I really need is for someone to take this seriously.
I can trigger an OutOfMemory exception by running Optimize References on a two-project solution. Environment is Win Server 2003 R2 32-bit w/4GB RAM. I sent this info to support.
---------------------------
ReSharper – Runtime Error – Technical Data
---------------------------
JetBrains ReSharper has encountered a runtime error.
Technical data follows.
Hint: Ctrl+C copies the text of system message boxes to Clipboard.
________________________________________________________________
Exception of type 'System.OutOfMemoryException' was thrown.
--- EXCEPTION #1/2 [OutOfMemoryException]
“ERROR RENDERING EXCEPTION” = “Exception of type 'System.OutOfMemoryException' was thrown.”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Exception of type 'System.OutOfMemoryException' was thrown.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = -2146232832
StackTraceString = “
at JetBrains.Application.Threading.MultiCoreFibersPool.Fibers.<>c__DisplayClassa.<EnqueueJobImpl>b__8()
at JetBrains.Application.Threading.MultiCoreFibersPool.FiberProc()
at JetBrains.Util.Logger.Catch(Action action)
at JetBrains.Application.Threading.MultiCoreFibersPool.<.ctor>b__1()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
”
---------------------------
OK
---------------------------
Hello
Sorry for delayed response! I'll take a look at the dumps. Meanwhile, do I understand correctly that you're still developing the solution you've described under virtual machines running 32-bit Windows XP? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Shawn
How many files does that solution contain? Could you please check if using the /3GB switch helps to avoid this problem? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Andrey,
Yes, this is with Windows XP 32-bit VMWare virtual machines with VS 2008.
I am happy to provide more dumps if you require. My experience has been that if I run VS 2008 without the devenv2008_wrap.exe, then I will get crashes before the solution finishes loading.
If I run it with the wrapper, then the solution can load (albeit slowly), but the first time I try to compile, it begins throwing OOM exceptions.
Cheers
Morgan
The solution has 2 projects, with 7948 files, 117201 c# code lines, 750 classes, 20103 aspx code lines. I just submitted another out of memory error screen.
---------------------------
ReSharper – Runtime Error – Technical Data
---------------------------
JetBrains ReSharper has encountered a runtime error.
Technical data follows.
Hint: Ctrl+C copies the text of system message boxes to Clipboard.
________________________________________________________________
Exception of type 'System.OutOfMemoryException' was thrown.
--- EXCEPTION #1/2 [OutOfMemoryException]
ExceptionPath = Root.InnerException
ClassName = System.OutOfMemoryException
HResult = COR_E_OUTOFMEMORY=E_OUTOFMEMORY=8007000E
Source = PresentationCore
StackTraceString = “
at System.Windows.Media.BoundsDrawingContextWalker.PushTypeStack(PushType pushType)
at System.Windows.Media.BoundsDrawingContextWalker.PushGuidelineY1(Double coordinate)
at System.Windows.Media.RenderData.DrawingContextWalk(DrawingContextWalker ctx)
at System.Windows.Media.RenderData.GetContentBounds(BoundsDrawingContextWalker ctx)
at System.Windows.Media.DrawingVisual.GetContentBounds()
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
at System.Windows.Media.Visual.get_VisualDescendantBounds()
at JetBrains.UI.Avalon.HwndSourceEx.GetElementBoundsInWindowPixels(UIElement uielement)
at JetBrains.UI.PopupWindowManager.AvalonAnchoringRect.UiElementLocalAnchoringRect.<.ctor>b__6()
at JetBrains.UI.PopupWindowManager.AvalonAnchoringRect.UiElementLocalAnchoringRect.<>c__DisplayClassd.<.ctor>b__7(Object , EventArgs )
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Exception of type 'System.OutOfMemoryException' was thrown.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Application.Env.Components.ReportUnhandledExceptions.<.ctor>b__6(Object sender, DispatcherUnhandledExceptionEventArgs args)
at System.Windows.Threading.DispatcherUnhandledExceptionEventHandler.Invoke(Object sender, DispatcherUnhandledExceptionEventArgs e)
at System.Windows.Threading.Dispatcher.CatchException(Exception e)
at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
”
---------------------------
OK
---------------------------
Hello Morgan and Shawn
Could you please check if using the /3GB switch (http://msdn.microsoft.com/en-us/library/windows/hardware/ff556232(v=vs.85).aspx) helps to reduce the number of OOM exceptions? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Still no luck with the /3GB switch. I just uploaded a video and error message (Resharper Memory Error.zip) to the ftp site for you to view.
Andrey: In my case, the /3GB switch has actually helped greatly, at least on one of my VM's. I can use the IDE for at least a few hours now, compiling multiple times, without an OOM so far.
Windows Task Manager shows the IDE as using greater than 1.4 GB of memory constantly.
I will monitor over the next few days, I have userdump running, so if it gets another one, I will post a new dump.
I hate to be sarcastic but WOW a whole 2 hours without a crash
Sadly I abandoned R# and am now using a competitor product(s) , and strangely I haven't had a OOM error since I uninstalled R#. I can only draw one conclusion.
I see lots of perfomance and memory errors being addressed ( I am getting fedback from Auto Error Logs sent back to Jet Brains) , but these are going into V7 , Are we to hope that V 7 will have all these things fixed and skip V6 as a bad dream. Unless we have the same pain bedding V7 down as we had bedding 6.0 down before big issues were addressed in 6.1
I am coming around to teh conclusion that small is beautiful , trying to cram all finctionality into one tool may well be the issue.
Mike
;)
Hello Morgan
Thank you for the update! I'm glad that this solution has helped you.
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Shawn
I see, we'll keep looking into this problem then. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Did you get my upload and see that the /3GB switch didn't help me?
Update: sorry, I posted too fast and before I got your response to me above.
Hello Shawn
However, I'm afraid I wasn't able to play the video that you've uploaded. Perhaps there was some upload error. How big should the .zip file be? For me it's only 619kb.
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Once uncompressed, it should be 4.88MB. Do you have different players to try with?
Andrey, Did you get the video to play after un-zipping it? I'm getting the same error on a different machine and a different project. This is a much smaller project - only 144 aspx files, and 58 .vb files in a single project. I was able to capture a memory crash using the memory profiler and I've uploaded it. Filename is ResharperProfile.zip