FabianTerhorst / coreclr-module

Old alt:V CoreClr (.NET Core Common Language Runtime) community made module. New: https://github.com/altmp/coreclr-module

Home Page:https://docs.altv.mp/cs/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client crash on MValue use

TuK4z opened this issue · comments

commented

It was same issue with serverside Emit, but same issue still exist in clientside.

Create object with MValue

public class TestModel : IWritable
{
    public int TestParam { get; set; } = 0;
    public void OnWrite(IMValueWriter writer)
    {
        writer.BeginObject();
        writer.Name("TestParam");
        writer.Value(TestParam);
        writer.EndObject();
    }
}

Try Emit to WebView

TestModel a = new ();
a.TestParam = 1;
Scripts.WebView.WebViewObj?.Emit("Hud:Test", a);
commented

Rc9 not crashing anymore

Fixed in alt:V version 15.0-dev592 and 15.0-rc9