8.1 Memory Leak?

A colleageof mine had a runtime error pointing to ReSharper (see below).

Environment: Win 7, 32bit, Visual Studio 2010, ReSharper 8.1

Crashes like this occur rather often. Is there something to circumvent this problem? Or is there a known memory leak in ReSharper which waits to be fixed?

Kind regards,

Stefan Küsters

—————————————————————————————————————————



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.

________________________________________________________________

 

An exception of typ "System.OutOfMemoryException" occurred.

 

 

 

--- EXCEPTION #1/2 [OutOfMemoryException]

ExceptionPath = Root.InnerException

ClassName = System.OutOfMemoryException

HResult = COR_E_OUTOFMEMORY=E_OUTOFMEMORY=8007000E

Source = JetBrains.Platform.ReSharper.Util

StackTraceString = “

  bei JetBrains.Util.DataStructures.ChunkSparseArray`1.set_Item(Int32 index, T value)

     bei JetBrains.Metadata.Access.ILReader.StreamsManager.GetString(Int32 offset)

     bei JetBrains.Metadata.Access.ILReader.ILReaderMetadataAccess.LoadTypeNamesMap()

     bei JetBrains.Metadata.Access.ILReader.ILReaderMetadataAccess.get_TypeName2TokenMapping()

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.TryGetTypeInfoFromQualifiedName(String name, Boolean searchReferencedAssemblies)

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.GetTypeInfoFromQualifiedName(String name, AssemblyNameInfo assemblyName, Boolean searchReferencedAssemblies)

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.GetTypeInfoFromQualifiedName(String qualifiedName, Boolean searchReferencedAssemblies)

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.GetTypeInfoFromToken(MetadataToken token)

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.GetTypeFromToken(MetadataToken token, TypeDecodeContext context)

     bei JetBrains.Metadata.Reader.Impl.MetadataAssembly.GetTypeFromToken(MetadataToken token)

     bei JetBrains.Metadata.Reader.Impl.MetadataTypeBuilder.BuildClassType(MetadataToken typeDefOrRefOrSpecToken)

     bei JetBrains.Metadata.Reader.Impl.TypeBlobDecoder.DecodeTypeDefOrRef[T,TMethodSig](IBinaryReader reader, ITypeBuilder`2 typeBuilder)

     bei JetBrains.Metadata.Reader.Impl.TypeBlobDecoder.DecodeType[TType,TMethodSig](IBinaryReader reader, ITypeBuilder`2 typeBuilder)

     bei JetBrains.Metadata.Reader.Impl.FieldSignatureBlobDecoder.DecodeFieldSig[TFieldType,TMethodSig](IBlob signature, ITypeBuilder`2 builder)

     bei JetBrains.Metadata.Reader.Impl.MetadataField..ctor(MetadataToken token, IMetadataAssembly assembly, Int32 fieldOffset)

     bei JetBrains.Metadata.Reader.Impl.MetadataTypeInfo.GetFields()

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.CompiledMembersBucket..ctor(CompiledType owner, IMetadataTypeInfo info, IReflectionBuilder builder, Boolean hasExtensionMethods, Boolean preloaded)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.MemberOwner.ProduceBucketInternal(MemberOwner owner, IMetadataAssembly assembly)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.MemberOwner.<ProduceBucket>b__10(MemberOwner x, IMetadataAssembly y)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.CompiledType.ExecuteWithMetadataAssembly[TParam,TRes](Func`3 action, TParam param)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.MemberOwner.ProduceBucket(KeyValuePair`2 pair)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.MemberOwner.<.ctor>b__e(KeyValuePair`2 x)

     bei JetBrains.Util.Caches.WeakParametrizedCachedValue`3.GetOrCreate(TParameter parameter, T& result)

     bei JetBrains.Util.Caches.WeakParametrizedCachedValue`3.GetOrCreate(TParameter parameter)

     bei JetBrains.ReSharper.Psi.Impl.Reflection2.MemberOwner.<GetMembers>d__27.MoveNext()

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.AddAllMembersExceptConstructors(ITypeElement element, LocalList`1& members)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.<GetOwnMembersSymbolTable>b__2(SymbolTableMode m, ITypeElement element, IPsiModule psiModule)

     bei JetBrains.ReSharper.Psi.Impl.Resolve.SymbolTableCache.GetOrCreate(OneToListMap`2 cache, ITypeElement element, SymbolTableMode mode, IPsiModule requestFromModule, SymbolTableFactory factory)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.GetOwnMembersSymbolTable(ITypeElement typeElement, SymbolTableMode mode)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.AddTypeMembers(IDeclaredType type, Int32 level, Nullable`1 inheritanceLevel, SymbolTableMode mode, HashSet`1 visited)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.AddDeclarationsForProperDeclaredType(IDeclaredType type, Int32 level, Boolean addObjectMembersForInterfaces, SymbolTableMode mode, IPsiModule module, HashSet`1 visited)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.<GetSymbolTableByTypeElement>b__0(SymbolTableMode m, ITypeElement element, IPsiModule psiModule)

     bei JetBrains.ReSharper.Psi.Impl.Resolve.SymbolTableCache.GetOrCreate(OneToListMap`2 cache, ITypeElement element, SymbolTableMode mode, IPsiModule requestFromModule, SymbolTableFactory factory)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.GetSymbolTableByTypeElement(ITypeElement typeElement, Int32 level, SymbolTableMode mode, IPsiModule module)

     bei JetBrains.ReSharper.Psi.Impl.Types.DeclaredTypeBase.GetSymbolTable(IPsiModule module)

     bei JetBrains.ReSharper.Psi.Xaml.Impl.Tree.References.XamlTypeReference.GetSymbolTable(SymbolTableMode mode)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.GetSymbolTableByReference(IQualifiableReferenceWithGlobalSymbolTable reference, SymbolTableMode mode)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.QualifiableCheckedReferenceBase`1.GetReferenceSymbolTable(Boolean useReferenceName)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.QualifiableCheckedReferenceBase`1.ResolveWithoutCache()

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.TreeReferenceBase`1.<.cctor>b__0(TreeReferenceBase`1 reference)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.ResolveUtil.ResolveWithCache[T](T reference, Func`2 resolveWithoutCache)

     bei JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.TreeReferenceBase`1.Resolve()

     bei JetBrains.ReSharper.Daemon.Xaml.Stages.XamlPropertySetterProblemAnalyzer.Run(IPropertySetter element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer)

     bei JetBrains.ReSharper.Daemon.Stages.Dispatcher.ElementProblemAnalyzer`1.JetBrains.ReSharper.Daemon.Stages.Dispatcher.IElementProblemAnalyzer.Run(ITreeNode element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer)

     bei JetBrains.ReSharper.Daemon.Stages.Dispatcher.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer)

     bei JetBrains.ReSharper.Daemon.Xml.Stages.XmlErrorStageProcess.ProcessBeforeInterior(ITreeNode element)

     bei JetBrains.ReSharper.Daemon.Xaml.Stages.XamlErrorStage.XamlErrorStageProcess.ProcessBeforeInterior(ITreeNode element)

     bei JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendants(ITreeNode root, IRecursiveElementProcessor processor)

     bei JetBrains.ReSharper.Daemon.Xml.Stages.XmlErrorStageProcess.Execute(Action`1 committer)

     bei JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.<>c__DisplayClass11.<DoHighlighting>b__4(IDaemonStage stage)

 

 

 

--- Outer ---

 

 

 

--- EXCEPTION #2/2 [LoggerException]

 

Message = “Eine Ausnahme vom Typ "System.OutOfMemoryException" wurde ausgelöst.”

 

ExceptionPath = Root

ClassName = JetBrains.Util.LoggerException

InnerException = “Exception #1 at Root.InnerException”

HResult = COR_E_APPLICATION=80131600

StackTraceString = “

  bei JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.<>c__DisplayClass11.<DoHighlighting>b__4(IDaemonStage stage)

     bei JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.<>c__DisplayClass11.<>c__DisplayClass18.<DoHighlighting>b__9()

     bei JetBrains.Application.Threading.Tasks.TaskBarrier.<>c__DisplayClass7.<>c__DisplayClass9.<EnqueueDependentJobs>b__5()

     bei JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass11.<Create>b__e(Object state)

     bei System.Threading.Tasks.Task.InnerInvoke()

     bei System.Threading.Tasks.Task.Execute()

     bei System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)

     bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

     bei System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)

     bei System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)

     bei System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)

     bei JetBrains.Application.Threading.Tasks.JetScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)

     bei System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)

     bei System.Threading.Tasks.Task.WrappedTryRunInline(TaskScheduler currentScheduler, Object currentSchedulerStatics)

     bei System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)

     bei JetBrains.Application.Threading.Tasks.TaskBarrier.DisposeUnmanagedResources()

     bei JetBrains.Util.SafeDisposable.DisposeInternal()

     bei JetBrains.Util.SafeDisposable.Dispose()

     bei JetBrains.ReSharper.Daemon.Impl.DaemonProcessBase.DoHighlighting(DaemonProcessKind processKind, Action`1 commiter)

     bei JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.DoHighlighting(Boolean globalAnalysisStages)

     bei JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.<>c__DisplayClass5.<EnqueueHighlightingJob>b__3()

     bei JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass11.<Create>b__e(Object state)

     bei System.Threading.Tasks.Task.InnerInvoke()

     bei System.Threading.Tasks.Task.Execute()

     bei System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)

     bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

     bei System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)

     bei System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)

     bei System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)

     bei JetBrains.Application.Threading.Tasks.JetScheduler.JetSchedulerThread.ThreadPoolProc()

     bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)

     bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

     bei System.Threading.ThreadHelper.ThreadStart()

 

 

---------------------------

OK   

---------------------------

2 comments
Comment actions Permalink

Hi

There are many posts around te subject , many from me !!

Basically its not an 8.1 issue , its R# in general , there is so much data kept in memory to enable all the intellesence , hints and tips, analysis  etc that finally something gives.

I was working on a "works PC" with Win 7 32 bit and 4 Gb RAM, because that was the provided kit.

I hate to say it but I cured the problem by going 64 bit and 8 Gb of RAM for my "Home PC"  No matter what I tried in 32 bit and 4 Gb I kept getting crashes. ( i was due a new PC anyway)

It depends a lot on several factors as I saw it

  • Size of Project - The bigger the more is stored in memory
  • Type of Project , my experience was Database projects abd VB were a lot worse than C#. I wasa working on a combination of a Big VB project and a big b project
  • VS edition, I saw many crashes as the Ultimate edition called in Code Analysis


My company did not use R# and the copy was my own , hence the build process was set set for standard VS code analysis, which I could not turn of without loads of check in issues.

There is the option of turning off some features but you lose so much its hardly an option.

There are smaller products around with lower memory usage but you get what you pay for so as to speak.

For a long while , I had a love hate relation with R# , I kept getting grumpy with JetBrains , but the bottom line is that there is nothing quite matches up to R# but it comes with a hardware demand.

Since retiring I have dropped back to the VS pro editions rather thgan ultimate and I see lower memory usgae as well.

I suppose there is an option of reducing the project size by splitting up libraries to keep each one small , but inevitatbly this may not fit with TFS policies etc.

Hope This Helps

Merry Xmas

Mike

0
Comment actions Permalink

i made the same experience like Mike, specially with a larger VB solution (around 500.000 lines in a single project, some source files have more than 10.000 lines of code). In older versions of R# i even had memory issues on 64-bit systems.Currently the best solution is to move to 64-bit (4GB memory will be enough). Also VS 2012 / VS 3013 works better than VS 2010.

Regards
Klaus

0

Please sign in to leave a comment.