Out of memory exception during spliting file into multiple files.

Hello everyone, I'm new here :)

Yesterday I downloaded trial of resharper for vs2017. I trying to split huge file (220k lines) into separate files. It's generated file from WSDL but VS also has problem with working with it (crashing etc.). Is there any workaround to this? I have 12GB ram  (~6GB+ free). This is what I got:

09:04:10.080 |I| IndicatorsItemsControl | :1 | ResizeGrip. ResizeGripControl
09:04:10.097 |I| IndicatorsItemsControl | :1 | Panel = StatusBarPanel - DockPanel
09:04:10.139 |I| IndicatorsItemsControl | :1 | TrySubclass. Take 2. OK
09:06:12.098 |I| TriggerSolutionBuildAfterOpen | :1 | not requested
09:06:12.098 |I| TriggerSolutionBuildAfterOpen | :1 | not requested at all
09:06:12.098 |I| TriggerSolutionBuildAfterOpen | :1 | !buildRequested
09:06:13.873 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution instance created 48592513
09:06:14.624 |I| IncrementalBuildTrigger | :1 | !myShouldBuild
09:06:19.952 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution load done 48592513. Lifetime.IsTerminated=False
09:06:26.502 |I| InitialExplorationTask | JetPool(S) #1:21 | Initial unit-test exploration started
09:06:26.638 |I| InitialExplorationTask | JetPool(S) #1:21 | Initial unit-test exploration completed
09:20:42.352 |E| StubTreeNodeCache | JetPool(S) #1:21 | Error while writing to leveldb Can't allocate more memory for chunk: 536870912 bytes, currentlyAllocated=268435456, count=268435453 Za mało pamięci, aby kontynuować wykonywanie tego programu.

--- EXCEPTION #1/3 [OutOfMemoryException]
Message = “Za mało pamięci, aby kontynuować wykonywanie tego programu.”
ExceptionPath = Root.InnerException.InnerException
ClassName = System.OutOfMemoryException
HResult = E_OUTOFMEMORY=COR_E_OUTOFMEMORY=8007000E
Source = mscorlib
StackTraceString = “
at System.Runtime.InteropServices.Marshal.ReAllocHGlobal(IntPtr pv, IntPtr cb)
at JetBrains.Util.PersistentMap.UnsafeWriter.Realloc(Int32 newCount)

--- Outer ---

--- EXCEPTION #2/3 [ArgumentException]
Message = “Can't allocate more memory for chunk: 536870912 bytes, currentlyAllocated=268435456, count=268435453”
ExceptionPath = Root.InnerException
ClassName = System.ArgumentException
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = E_INVALIDARG=COR_E_ARGUMENT=80070057
Source = JetBrains.Platform.RdCore
StackTraceString = “
at JetBrains.Util.PersistentMap.UnsafeWriter.Realloc(Int32 newCount)
at JetBrains.ReSharper.Psi.Caches.StubTreeNodeCache.StubTreeNodesMapWriter.WriteTreeNode(TreeElement node2, ILanguageCacheProvider languageCacheProvider, UnsafeWriter bufferWriter)
at JetBrains.ReSharper.Psi.Caches.StubTreeNodeCache.StubTreeNodesMapWriter.WriteFileTreeNode(UnsafeWriter bufferWriter, IFile node)
at JetBrains.Util.PersistentMap.UniversalMarshaller`1.Marshal(UnsafeWriter writer, T value)
at JetBrains.Application.PersistentMap.LevelDbTransaction.Add[TKey,TValue](IPersistentSortedMap`2 map, TKey key, TValue value)
at JetBrains.Application.PersistentMap.OptimizedPersistentSortedMap`2.Add(TKey key, TValue value)
at JetBrains.ReSharper.Psi.Caches.StubTreeNodeCache.StubTreeNodeCache.GetFullPsiFile(IPsiSourceFile sourceFile, PsiLanguageType language)

--- Outer ---

--- EXCEPTION #3/3 [LoggerException]
Message = “Error while writing to leveldb Can't allocate more memory for chunk: 536870912 bytes, currentlyAllocated=268435456, count=268435453”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = “JetPool(S) #1”
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Psi.Caches.StubTreeNodeCache.StubTreeNodeCache.GetFullPsiFile(IPsiSourceFile sourceFile, PsiLanguageType language)
at JetBrains.ReSharper.Psi.Files.CachedPsiFile..ctor(IPsiSourceFile sourceFile, PsiLanguageType langType, ReferenceProviderFactory referenceProviderFactory, ILexerFactory lexerFactory, IShellLocks locks)
at JetBrains.ReSharper.Psi.Files.PsiFilesCommit.BuildPrimary(PreparedSourceFile preparedSourceFile)
at JetBrains.ReSharper.Psi.Files.PsiFilesCommit.Build(ICollection`1 sourceFilesToCommit, Boolean reparse, IPsiFilesCache psiFilesCache)
at JetBrains.ReSharper.Psi.Files.PsiFilesCache2.ProduceBucket(KeyValuePair`2 pair)
at JetBrains.Util.Caches.WeakParametrizedCachedValue`3.GetOrCreate(TParameter parameter, T& result, Action`1 afterCreate)
at JetBrains.ReSharper.Psi.Files.PsiFilesCache2.GetOrCreateBucket(IPsiFiles psiFiles, IPsiSourceFile sourceFile)
at JetBrains.ReSharper.Psi.Files.PsiFilesCache2.GetOrCreateCachedPsiFile(IPsiFiles psiFiles, IPsiSourceFile sourceFile, PsiLanguageType language)
at JetBrains.ReSharper.Psi.Files.PsiFiles.AppendDominantFiles(IPsiSourceFile sourceFile, DocumentRange range, Type languageType, PsiLanguageCategories languageCategory, LocalList`1& consumer)
at JetBrains.ReSharper.Psi.Files.PsiFiles.GetPsiFiles(IPsiSourceFile sourceFile, Type languageType, DocumentRange range, PsiLanguageCategories categories)
at JetBrains.ReSharper.Psi.Files.PsiFiles.GetPsiFiles[TLanguage](IPsiSourceFile sourceFile, PsiLanguageCategories categories)
at JetBrains.ReSharper.Feature.Services.Actions.CurrentPsiFileRequirementBase.<GetReady>b__17_4()
at JetBrains.Application.Threading.InterruptableReadActivityThe.Work()
at JetBrains.Application.Threading.InterruptableReadActivity.DoWork()
at JetBrains.Application.Threading.InterruptableReadActivity.WorkerThreadProc()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass2_0.<RunSafe>b__0()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

09:21:06.034 |W| | :1 | The system cannot find the file specified.
09:21:10.354 |E| | :1 | Exception of type 'System.OutOfMemoryException' was thrown.

--- EXCEPTION #1/2 [OutOfMemoryException]
ExceptionPath = Root.InnerException
ClassName = System.OutOfMemoryException
HResult = E_OUTOFMEMORY=COR_E_OUTOFMEMORY=8007000E
Source = mscorlib
StackTraceString = “
at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
at System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
at JetBrains.Extension.StreamEx.ReadTextFromFile(Stream stream, Encoding& detectedEncoding)
at JetBrains.DocumentModel.Impl.DocumentUtil.ReadTextImpl(Func`1 createStream, Encoding& detectedEncoding)
at JetBrains.DocumentModel.Impl.DocumentUtil.ReadTextFromFile(FileSystemPath path, Encoding& detectedEncoding)
at JetBrains.DocumentModel.FileSystemDocumentOperationsHandler.GetText(Encoding& encoding)
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey..ctor(IDocumentOperationsHandler documentOperationsHandler, IDocumentTransactionManager transactionManager, Func`2 ensureWritableHandler, IShellLocks locks, DocumentChangeManager documentChangeManager, IVsDocumentReadOnlyRegions vsDocumentReadOnlyRegions, IDocumentOwner documentOwner, VsDocumentOperationsWhidbey documentOperations)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentManagerDocumentFactory.CreateDocument(IProjectFile projectFile, IDocumentOwner owner)
at JetBrains.DocumentManagers.DocumentsOnProjectFiles.CreateDocument(IProjectFile profile)
at JetBrains.DocumentManagers.DocumentToProjectFileMappingStorage.GetOrCreateDocument(IProjectFile projectFile, Func`2 create)
at JetBrains.DocumentManagers.DocumentsOnProjectFiles.GetOrCreateDocument(IProjectFile projectFile)
at JetBrains.DocumentManagers.DocumentManagerExtensions.GetDocument(IProjectFile projectFile)
at JetBrains.ReSharper.Refactorings.Move.Common.MoveUtil.CreateProjectFileCopy(IProjectFolder folder, FileSystemPath location, IProjectFile prototypeFile, Boolean copyContent, BuildAction buildAction)
at JetBrains.ReSharper.Refactorings.Move.MoveIntoMatchingFile.Impl.MoveIntoMatchingFilesCollector.CreateRequiredFiles(IProgressIndicator pi)
at JetBrains.ReSharper.Refactorings.Move.MoveIntoMatchingFile.MoveIntoMatchingFilesWorkflow.PreExecute(IProgressIndicator pi)
at JetBrains.ReSharper.Feature.Services.Refactorings.DrivenRefactoringConflictSearcher.SearchConflicts(IProgressIndicator pi, Boolean canPerformRefactoring)
at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.<>c__DisplayClass42_0.<InitPage>b__0(IProgressIndicator pi)
at JetBrains.ReSharper.Feature.Services.Refactorings.FunctionWrapper`1.ExecuteAction(IProgressIndicator pi)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Exception of type 'System.OutOfMemoryException' was thrown.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Feature.Services.Refactorings.FunctionWrapper`1.ExecuteAction(IProgressIndicator pi)
at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)
at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunCore(TaskThreadAffinity taskThreadAffinity, Action`1 FTask, Func`3 FAttachUi, ProgressIndicator progressIndicator, IWin32Window parentWindow, IThreading threading, WorkerThreadShop workerThreadShop, Boolean enforceModalityState)
at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.Run(TaskThreadAffinity taskThreadAffinity, Action`1 task, Func`3 FAttachUi, ProgressIndicator indicator, IWin32Window parentWindow, IThreading threading, WorkerThreadShop workerThreadShop, Boolean enforceModalityState)
at JetBrains.PsiFeatures.UIInteractive.Refactorings.RefactoringsTaskExecutor.JetBrains.Application.Progress.ITaskExecutor.ExecuteTask(String name, TaskCancelable cancelable, Action`1 task)
at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.RunWithProgress[TResult](Func`2 action, String taskName, TResult& result)
at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.InitPage(IRefactoringPage page)
at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.NextPage(IRefactoringPage currentPage)
at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.MoveToNextPage()
at JetBrains.PsiFeatures.UIInteractive.Refactorings.CommonUI.WorkflowHostWithWizardForm.<NextClick>b__18_0()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action, TaskPriority priority)
at JetBrains.PsiFeatures.UIInteractive.Refactorings.CommonUI.WorkflowHostWithWizardForm.NextClick(Object sender, EventArgs e)
at JetBrains.PsiFeatures.UIInteractive.Refactorings.CommonUI.RefactoringWizardForm.myContinueButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

09:21:12.788 |I| UnitTestSessionRepository | :1 | << (Opening) Loading sessions from persistent storage
09:21:12.788 |I| UnitTestSessionRepository | :1 | << (Closing) Loading sessions from persistent storage

0

Please sign in to leave a comment.