-
-
Notifications
You must be signed in to change notification settings - Fork 754
Closed
Milestone
Description
MessagePackWriter throws ExecutionEngineException in Utilities.GetMemoryCheckResult on line:
MessagePack-CSharp/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs
Line 36 in 1a582ca
| var memory = bufferWriter.GetMemory(size); |
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)zhuchunzhuchun and xlonelyhunter
Metadata
Metadata
Assignees
Labels
No labels