Skip to content

IL2CPP Failed on 6000.5.xx build #2717

Description

@zhiyan114

SDK Version

4.4.0

Unity Version

6000.5.0f1

Platform

  • Editor
  • Mobile (Android, iOS)
  • Desktop (Windows, macOS, Linux)
  • WebGL
  • Console

Sentry Environment

Sentry SaaS (sentry.io)

Other Error Monitoring Solution

No

Steps to Reproduce

  1. Setup a unity project or upgrade existing version
  2. Install/Upgrade latest unity sentry package
  3. Build project as IL2CPP (tested with Win IL2CPP and WebGL)

Expected vs Actual Result

Expected:

Compilation works as unity 6.4.xxx builds


Actual:

Compilation failed, related to Sentry.System.Memory.dll

Sample outout:

E:\Program Files\Hub\Editor\6000.5.0f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/BouncyCastle.Crypto.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/io.sentry.unity.runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/protobuf-net.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.Microsoft.Bcl.AsyncInterfaces.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Buffers.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Collections.Immutable.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Memory.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Numerics.Vectors.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Reflection.Metadata.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Runtime.CompilerServices.Unsafe.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Text.Encodings.Web.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Text.Json.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.System.Threading.Tasks.Extensions.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Sentry.Unity.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Net.Http.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Numerics.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Runtime.CompilerServices.Unsafe.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.2D.Animation.Runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.Unsafe.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Collections.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InputSystem.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InputSystem.ForUI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InternalAPIEngineBridge.001.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InternalAPIEngineBridge.004.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Scripting.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.TextMeshPro.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AndroidJNIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ContentLoadModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ImageConversionModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputForUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.JSONSerializeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.MathematicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsCore2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ScreenCaptureModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ScriptingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UnityWebRequestModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.WebGLModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.XRModule.dll --generatedcppdir=F:/Flappy-Bird/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --symbols-folder=F:/Flappy-Bird/Library/Bee/artifacts/WebGL/il2cppOutput/cpp/Symbols --enable-analytics --emit-method-map --dotnetprofile=unityaot-linux --usymtool-path=E:/Program Files/Hub/Editor/6000.5.0f1/Editor/Data/Tools\usymtool.exe --profiler-report --profiler-output-file=F:/Flappy-Bird/Library/Bee/artifacts/il2cpp_conv_e9mn.traceevents --print-command-line --static-lib-il2-cpp --data-folder=F:/Flappy-Bird/Library/Bee/artifacts/WebGL/il2cppOutput/data --emit-source-mapping
Error: IL2CPP error for method 'T& System.Span`1::get_Item(System.Int32)' in assembly 'F:\Flappy-Bird\Library\Bee\artifacts\WebGL\ManagedStripped\Sentry.System.Memory.dll'
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Unity.IL2CPP.IntrinsicRemap.SpanGetItemArguments(IGeneratedMethodCodeWriter writer, IntrinsicCall call, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport)
   at Unity.IL2CPP.IntrinsicRemap.GetMappedCallFor(IGeneratedMethodCodeWriter writer, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 arguments, List`1 poppedValues)
   at Unity.IL2CPP.MethodBodyWriter.TryWriteIntrinsicMethodCall(String returnVariable, IGeneratedMethodCodeWriter writer, MethodReference callingMethod, ResolvedMethodInfo methodToCall, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 argumentArray, Boolean useArrayBoundsCheck, List`1 poppedValues)
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass9_0.<WriteAdjustorThunk>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef, WritingMethodFor writingMethodFor)
   at Unity.IL2CPP.MethodWriter.WriteAdjustorThunk(MethodWriteContext context, IGeneratedMethodCodeWriter writer)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method)
   at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeWritingInformation& writingInformation, NPath filePath, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
Error: IL2CPP error for method 'T& System.Span`1::get_Item(System.Int32)' in assembly 'F:\Flappy-Bird\Library\Bee\artifacts\WebGL\ManagedStripped\Sentry.System.Memory.dll'
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Unity.IL2CPP.IntrinsicRemap.SpanGetItemArguments(IGeneratedMethodCodeWriter writer, IntrinsicCall call, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport)
   at Unity.IL2CPP.IntrinsicRemap.GetMappedCallFor(IGeneratedMethodCodeWriter writer, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 arguments, List`1 poppedValues)
   at Unity.IL2CPP.MethodBodyWriter.TryWriteIntrinsicMethodCall(String returnVariable, IGeneratedMethodCodeWriter writer, MethodReference callingMethod, ResolvedMethodInfo methodToCall, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 argumentArray, Boolean useArrayBoundsCheck, List`1 poppedValues)
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass9_0.<WriteAdjustorThunk>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef, WritingMethodFor writingMethodFor)
   at Unity.IL2CPP.MethodWriter.WriteAdjustorThunk(MethodWriteContext context, IGeneratedMethodCodeWriter writer)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method)
   at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeWritingInformation& writingInformation, NPath filePath, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
Error: IL2CPP error for method 'T& modreq(System.Runtime.InteropServices.InAttribute) System.ReadOnlySpan`1::get_Item(System.Int32)' in assembly 'F:\Flappy-Bird\Library\Bee\artifacts\WebGL\ManagedStripped\Sentry.System.Memory.dll'
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Unity.IL2CPP.IntrinsicRemap.SpanGetItemArguments(IGeneratedMethodCodeWriter writer, IntrinsicCall call, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport)
   at Unity.IL2CPP.IntrinsicRemap.GetMappedCallFor(IGeneratedMethodCodeWriter writer, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 arguments, List`1 poppedValues)
   at Unity.IL2CPP.MethodBodyWriter.TryWriteIntrinsicMethodCall(String returnVariable, IGeneratedMethodCodeWriter writer, MethodReference callingMethod, ResolvedMethodInfo methodToCall, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 argumentArray, Boolean useArrayBoundsCheck, List`1 poppedValues)
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass9_0.<WriteAdjustorThunk>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef, WritingMethodFor writingMethodFor)
   at Unity.IL2CPP.MethodWriter.WriteAdjustorThunk(MethodWriteContext context, IGeneratedMethodCodeWriter writer)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method)
   at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeWritingInformation& writingInformation, NPath filePath, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
Error: IL2CPP error for method 'T& modreq(System.Runtime.InteropServices.InAttribute) System.ReadOnlySpan`1::get_Item(System.Int32)' in assembly 'F:\Flappy-Bird\Library\Bee\artifacts\WebGL\ManagedStripped\Sentry.System.Memory.dll'
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Unity.IL2CPP.IntrinsicRemap.SpanGetItemArguments(IGeneratedMethodCodeWriter writer, IntrinsicCall call, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport)
   at Unity.IL2CPP.IntrinsicRemap.GetMappedCallFor(IGeneratedMethodCodeWriter writer, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 arguments, List`1 poppedValues)
   at Unity.IL2CPP.MethodBodyWriter.TryWriteIntrinsicMethodCall(String returnVariable, IGeneratedMethodCodeWriter writer, MethodReference callingMethod, ResolvedMethodInfo methodToCall, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 argumentArray, Boolean useArrayBoundsCheck, List`1 poppedValues)
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass9_0.<WriteAdjustorThunk>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef, WritingMethodFor writingMethodFor)
   at Unity.IL2CPP.MethodWriter.WriteAdjustorThunk(MethodWriteContext context, IGeneratedMethodCodeWriter writer)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method)
   at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeWritingInformation& writingInformation, NPath filePath, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
   at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
Error: IL2CPP error for method 'System.Boolean System.Buffers.Text.Utf8Parser::TryParseAsSpecialFloatingPoint(System.ReadOnlySpan`1<System.Byte>,T,T,T,T&,System.Int32&)' in assembly 'F:\Flappy-Bird\Library\Bee\artifacts\WebGL\ManagedStripped\Sentry.System.Memory.dll'
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at Unity.IL2CPP.IntrinsicRemap.SpanGetItemArguments(IGeneratedMethodCodeWriter writer, IntrinsicCall call, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport)
   at Unity.IL2CPP.IntrinsicRemap.GetMappedCallFor(IGeneratedMethodCodeWriter writer, ResolvedMethodInfo methodToCall, MethodReference callingMethod, RuntimeMetadataSupport runtimeMetadataSupport, IReadOnlyList`1 arguments, List`1 poppedValues)
   at Unity.IL2CPP.MethodBodyWriter.TryWriteIntrinsicMethodCall(String returnVariable, IGeneratedMethodC<message truncated>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugsomething isn't working as it shouldUnityplatform label

    Projects

    Status
    Done
    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions