Closed rainbowlee closed 5 years ago
Would it be possible to share the project that hits the error with us?
I created a new project,and added dependency project one by one.
It had an error below:
MSBUILD : error MSB1025: 运行 MSBuild 时发生内部错误。
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Go7(RegexRunner )
at System.Text.RegularExpressions.CompiledRegexRunner.Go()
at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen, Boolean quick, TimeSpan timeout)
at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
at System.Text.RegularExpressions.Regex.Match(String input, Int32 startat)
at System.Text.RegularExpressions.Regex.Match(String input)
at Microsoft.Build.Shared.CanonicalError.Parse(String message)
at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessageFromText(String lineOfText, MessageImportance messageImportance)
at Microsoft.Build.Tasks.Exec.LogEventsFromTextOutput(String singleLine, MessageImportance messageImportance)
at Microsoft.Build.Utilities.ToolTask.LogMessagesFromStandardErrorOrOutput(Queue dataQueue, ManualResetEvent dataAvailableSignal, MessageImportance messageImportance, StandardOutputOrErrorQueueType queueType)
at Microsoft.Build.Utilities.ToolTask.HandleToolNotifications(Process proc)
at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Tasks.Exec.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Utilities.ToolTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
at Microsoft.Build.BackEnd.TaskBuilder.InitializeAndExecuteTask(TaskLoggingContext taskLoggingContext, ItemBucket bucket, IDictionary2 taskIdentityParameters, TaskHost taskHost, TaskExecutionMode howToExecuteTask) at Microsoft.Build.BackEnd.TaskBuilder.ExecuteBucket(TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Dictionary
2 lookupHash)
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TaskExecutionMode mode, Lookup lookup)
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TargetLoggingContext loggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild taskInstance, TaskExecutionMode mode, Lookup inferLookup, Lookup executeLookup, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.TargetEntry.ProcessBucket(ITaskBuilder taskBuilder, TargetLoggingContext targetLoggingContext, TaskExecutionMode mode, Lookup lookupForInference, Lookup lookupForExecution)
at Microsoft.Build.BackEnd.TargetEntry.ExecuteTarget(ITaskBuilder taskBuilder, BuildRequestEntry requestEntry, ProjectLoggingContext projectLoggingContext, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.TargetBuilder.ProcessTargetStack(ITaskBuilder taskBuilder)
at Microsoft.Build.BackEnd.TargetBuilder.BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, String[] targetNames, Lookup baseLookup, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.RequestBuilder.BuildProject()
at Microsoft.Build.BackEnd.RequestBuilder.BuildAndReport()
at Microsoft.Build.BackEnd.RequestBuilder.RequestThreadProc(Boolean setThreadParameters)
MSBUILD : error MSB1025: 运行 MSBuild 时发生内部错误。
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary2 globalProperties, Dictionary
2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean detailedSummary, ISet1 warningsAsErrors, ISet
1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled Exception: OutOfMemoryException.
Compuer : win10 16G
error like this occured
Can you give me a e-mail, I will send the project to you
this error occured
My e-mail is at my github home page.
Ok, I have sent the code. Thanks for help
@jkotas Have you received mail from 283576530@qq.com?
Is it necessary to send mail again?
Yes, I received the email. Thanks! I did not have a chance to take a look yet.
Ok, If there is anything I can do for you just tell me
This is problem with infinite generic expansion.
public void Recycle(IPoolAllocatedObject<T> t)
method on ObjectPool<T>
calls IActionQueue.QueueAction<IPoolAllocatedObject<T>>(...)
. IActionQueue.QueueAction
. The method is generic and the compiler cannot tell which implementation is actually going to be used, so it compiles all of them.GameFramework.ServerAsyncActionProcessor.QueueAction<T>
that ends up referencing in ObjectPool<IPoolAllocatedObject<T>>
and the recursion repeats.Eventually, the compiler will crash will out of memory as it is trying to create more and more generic types that look like this:
GameFramework.ObjectPool`1<GameFramework.PoolAllocatedAction`1<GameFramework.IPoolAllocatedObject`1<GameFramework.PoolAllocatedAction`1<GameFramework.IPoolAllocatedObject`1<GameFramework.PoolAllocatedAction`1<GameFramework.IPoolAllocatedObject`1<GameFramework.PoolAllocatedAction`1<GameFramework.IPoolAllocatedObject`1<GameFramework.PoolAllocatedAction`1<...
This is duplicate of #363
The generic virtual interface methods tend to be unfriendly to AOT compilation (both full AOT compilation like CoreRT and partial AOT compilation like crossgen/NGen). Also, their runtime performance is not good because of their invocation is relatively slow. It is best to avoid them for these reasons.
Hope this helped. Closing as dup of #363. Thank you for sharing the repro.
Thanks. We will try to avoid this issue
I try to build a chat project. The error occuried.
C:\Users\hqfy.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-27416-01\build\Microsoft.NETCore.Native.targets(235,5): error MSB3073: 命令“"C:\Users\hqfy.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-27416-01\tools\ilc" @"obj\debug\netcoreapp2.0\win-x64\native\ChatServer.ilc.rsp"”已退出,代码为 -536852669。 [D:\guiltydomain\guiltydomain_netcore\Server\Chat\Chat_dotnet.csproj]