Skip to content

fix(clrcore-v2): Fix PR #2546 and Add Delegate Serialization Support #3409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

manups4e
Copy link
Contributor

@manups4e manups4e commented May 19, 2025

Goal of this PR

Re-enable (De)Serialization using the new custom msgpack provided in #2546

How is this PR achieving the goal

This PR adds back all Thorium's modifications and some extras to be fully compatible with the new MsgPack (de)serialization.

Warning

This PR applies to the following area(s)

Successfully tested on

FXServer and FiveM client

Game builds: N/A

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

fixes #2653, #2613, #2590, #2582, #2571,

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label May 19, 2025
@manups4e manups4e changed the title Fix PR #2546 and Add Delegate Serialization Support [MonoV2] Fix PR #2546 and Add Delegate Serialization Support May 19, 2025
@manups4e
Copy link
Contributor Author

i see the commits have wrong naming convention 🤔 question is how do i change the names XD

@Gogsi
Copy link
Contributor

Gogsi commented May 19, 2025

If you use the Git in Visual Studio (I assume other clients are similar), right click on the commit before your oldest commit, Reset -> Keep changes.

image

This will remove all of your commits, but will keep all of your changes in the uncommitted changes on the right. So you can can make 1 new commit with all of the changes in it and the right naming.

Once you do that to overwrite your changes to github, you will need to force push. Git -> Open In Command Prompt, and type in git push --force

EDIT: Apparently you can also select all of your commits and right click -> Squash commits, instead of resetting and making a new one. Still needs a force push

}
catch (Exception ex)
{
Debug.WriteException(ex, funcRef.m_method, args, "reference function");
//Debug.WriteException(ex, funcRef.m_method, args, "reference function");
Debug.WriteLine(ex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change can be reverted to WriteException again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it should be i'll check it as soon as i get home and commit.

@@ -25,6 +25,11 @@ public Function(MsgPackFunc method, byte[] id)

private static Dictionary<int, Function> s_references = new Dictionary<int, Function>();

static ReferenceFunctionManager()
{
MsgPackReferenceRegistrar.CreateFunc = Create;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to manually add the new MsgPackReferenceRegistrar.cs file in CitizenFX.Core csproj, but VS didn't register that, i suspect that when the module is loaded after merge it'll be automatically added as part of the msgpack library itself

@manups4e manups4e changed the title [MonoV2] Fix PR #2546 and Add Delegate Serialization Support fix(clrcore-v2): Fix PR #2546 and Add Delegate Serialization Support May 22, 2025
manups4e and others added 2 commits May 22, 2025 16:38
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels May 22, 2025
@github-actions github-actions bot added invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C# Export Server Crash 8978+
3 participants