thorium-cfx / mono_v2_get_started

Mono v2 runtime for FiveM/RedM
38 stars 5 forks source link

Server crash caused by hot reload #6

Closed Marky-S closed 1 year ago

Marky-S commented 1 year ago

What happened?

Server crashed

Expected result

Server working

Reproduction steps

1. Launch empty server resource
2. Restart resource (hot reload)

Importancy

Fatal (we can't use the runtime without)

Specific version

FiveM 6464/Canary. Server 6464 win32

Extra

Server script:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CitizenFX.Core;
using CitizenFX.Server.Native;

namespace server
{
    public class Entry
    {

    }
}

Server console:

[17144] FXServer Exited.
[17144] FXServer Closed (0xC0000005)

server crashes/ folder is empty there is my resource.zip

There is server console crash log when i restart (hot reload) my resource from F8 console from client (not empty resource)

* Assertion at W:\cf\mono\mono\metadata\handle.c:275, condition `mono_object_domain (elem->o) != domain' not met

* Assertion at W:\cf\mono\mono\metadata\handle.c:275, condition `mono_object_domain (elem->o) != domain' not met

* Assertion: should not be reached at W:\cf\mono\mono\sgen\sgen-scan-object.h:91

also have .dmp crash file after hot reload not empty resource through F8 e180523a-0237-4d60-b013-b5a71f7b20fd.zip

NOTE: Rollback to server version 6461 makes all working

thorium-cfx commented 1 year ago

With script entry, do you mean a BaseScript constructor?

Marky-S commented 1 year ago

With script entry, do you mean a BaseScript constructor?

I edited issue, i can't even make any hot reload at all

thorium-cfx commented 1 year ago

Fixed in 6465. Apparently the fixes for this issue and #3 solved the known SIGSEGV on resource stops as well!