Skip to content

Unity, ExecutionEngineException: An unresolved indirect call lookup failed #1695

@vanifatovvlad

Description

@vanifatovvlad

MessagePackWriter throws ExecutionEngineException in Utilities.GetMemoryCheckResult on line:


Reproducible with:

  • Unity 2022.3.11
  • IL2CPP Code Generation = Faster (smaller) builds
  • MessagePack v2.5.124
var stream = new ArrayBufferWriter<byte>();
var writer = new MessagePackWriter(stream);
writer.Write(123);
writer.Flush();

Not reproducible with Unity 2021.3 or with IL2CPP Code Generation = Faster runtime


Can be fixed by replacing method declaration:

// from
internal static Memory<T> GetMemoryCheckResult<T>(this IBufferWriter<T> bufferWriter, int size = 0)
// to
internal static Memory<byte> GetMemoryCheckResult(this IBufferWriter<byte> bufferWriter, int size = 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions