MemoryPack icon indicating copy to clipboard operation
MemoryPack copied to clipboard

MONO interpreter: NIY encountered in method MemoryPack.IMemoryPackable.Deserialize

Open thedude61636 opened this issue 5 months ago • 1 comments

Greetings, First off You have a great package and it's really fast. However I'm getting an issue in blazor wasm with a certain object I have Currently the object has 74 fields, as soon as I add four more it crashes on deserialization on the browser in release mode and only in release mode.

MONO interpreter: NIY encountered in method MemoryPack.IMemoryPackable<Shared.Models.Main.MainModel>.Deserialize
logging.ts:119  
Error: [MONO] * Assertion: should not be reached at /__w/1/s/src/mono/mono/mini/interp/interp.c:3850

these are the fields I have I've omitted the names

public double?
public double?
public double?
public double?
public double?
public double?
public double?
public int?
public int?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public long?
public byte?
public byte?
public byte?
public byte?
public DateTime?
public DateTime?
public DateTime?
public DateTime?
public DateTime?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?
public string?

I've noticed if i remove a string it stops crashing but if i remove a byte it still crashes. the exact object i'm serializing and deserializing is DataResponse<List<MainModel>> and this is the class for it

[MemoryPackable]
public partial class DataResponse<T>
{
    public DataResponse(T data)
    {
        Data = data;
    }

    public T Data { get; set; }
    public long? Result { get; set; }
    public string? ResultText { get; set; }
}

it was working fine until I added two strings and two longs if I remove any of them it works but if I remove a byte it still crashes the some of the fields have attributes [Display] and [JsonIgnore] and a custom attribute called [Order] I don't think it matters but I thought I should mention anyway

thedude61636 avatar Sep 01 '24 08:09 thedude61636