How to reproduce:
1. Open the attached project “BugRfcChar (2).zip”
2. Press File → Build Settings
3. Build the project on WebGL
4. Observe the Console
Expected result: project builds successfully
Actual result: project fails to build
Reproducible with: 2021.3.4f1, 2021.3.8f1
Not reproducible with: 2020.3.37f1, 2021.3.3f1, 2021.3.9f1, 2021.3.11f1, 2022.1.10f1, 2022.2.0b2, 2023.1.0a4
Reproducible on: Windows 10 Pro
Full error:
Error: IL2CPP error for type 'System.Net.WebHeaderCollection/RfcChar' in assembly 'C:\Users\danielius.pliuskys\Desktop\BugRfcChar\Library\Bee\artifacts\WebGL\ManagedStripped\System.dll'
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at Unity.IL2CPP.CodeWriters.ChunkedMemoryStream.Seek(Int64 offset, SeekOrigin origin)
at Unity.IL2CPP.CodeWriters.InMemoryGeneratedMethodCodeWriter.Write(IGeneratedMethodCodeStream other)
at Unity.IL2CPP.SourceWriters.SourceWriterBase{{2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager}}3.WorkerWriteItemsToFile(WorkItemData{{2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler}}1.WorkerLoop(Object data)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)