Search Issue Tracker

Active

Votes

0

Found in

2021.3.48f1

2022.3.56f1

6000.0.34f1

6000.1.0b2

Issue ID

UUM-95599

Regression

No

UnityLinker causes crash when outputting snapshot data for very large projects

-

*Steps to reproduce:*
# Run a player build using these UnityLinker args:

{code:java}
-enable-snapshot --snapshot-out=c:\snapshot --enable-report --generate-preservations{code}

# (There is no reproduction case as the bug just requires a very large project.)

 

*Stack Trace:*
{code:java}
Fatal error in Unity CIL Linker
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Text.StringBuilder.ToString()
   at System.IO.StreamReader.ReadToEnd()
   at Unity.Linker.Steps.Diagnostic.Reports.ReportGenerationStep.WriteHtmlReport()
   at Unity.Linker.Steps.Diagnostic.Reports.ReportGenerationStep.Process()
   at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver(){code}
 

*Notes:*
* Problem occurs in *ReportGenerationStep.WriteHtmlReport* where the entire XML report is being read into memory.

 

*Actual results:* Build fails

*Expected results:* Build succeeds

*Reproducible with versions:* 2021.3.48f1, 2022.3.56f1, 6000.0.34f1, 6000.1.0b2

*Not reproducible with versions:* -

*Can’t test with versions:* -

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.