Bannerlord Server Crash Fix Module

Users who are viewing this thread

Overview
This server side mod addresses some of the known crashes that exist for Bannerlord Dedicated Servers. We run this mod on the Calradic Campaign server and it has helped in stabilizing a lot of the crashes we have normally seen when playing Native.

FAQ
  • How does it work?
    • This server side mod uses Harmony to overwrite functions in TaleWorlds DLLs that have errors. They are created by looking at server crash dumps and stack traces, copying the code from the original DLL using dnSpy, and resolving the errors that cause the crash as a Harmony patch that overwrites the original function.
  • What happens if the original functions change after an update to the server files?
    • I do my best to keep the patches up to date to match the original code after releases. It is certainly one pitfall of this design, and if someone has any good ideas on how to address that, I would love to hear them
  • What happens if TW Patches the issues themselves?
    • I delete patches as they are fixed. One such case of this was when MissionLobbyComponent.OnPlayerKills was patched to resolve a null reference exception. We deleted this patch from the original code base this open source project was built from
  • What types of errors are you fixing?
    • The only types of errors currently being patched are Null Reference Exceptions. Not because that is the only type of exception that can be fixed, but for some reason that is the only exception being thrown throughout the server code. To resolve these issues, I just add more checks for null values and also add logging when the exception would have normally been hit. That allows for easier verification of if the patches are working and what null value is actually causing the problem.
  • Can I contribute to this project?
    • Please do. I am trying to increase server stability and assist TW in getting that stability baked into their code. See the README.md in the GitHub repo for more info
  • Can I report a crash my server is having?
    • Yes! Please see the instructions for the information I need to have the best chance at fixing the issue. But please be aware there are some crashes that even I can't fix. Especially related to any mods you may be running and their compatibility.
  • My server is still crashing even when using this module, what gives?
    • I certainly haven't caught all types of exceptions that may exist in the server code. If you are seeing crashes with or without using this server side module, please report them as an issue in the GitHub repo, and I will do my best to look into it.
Links
Release v1.0.2.0
GitHub Repository with More Info
 
Last edited:
You are the savior of the multiplayer community! Much appreciate!
This thread desire more responses.

I suggest you upload an all-in-one pack to GoogleDrive without players manually installing it. The installation steps are quite barely understandable to some players(And some people don't know how to use GitHub); it might be helpful to broaden your module in the community.

Best wishes.
 
Last edited:
You are the savior of the multiplayer community! Much appreciate!
This thread desire more responses.

I suggest you upload an all-in-one pack to GoogleDrive without players manually installing it. The installation steps are quite barely understandable to some players(And some people don't know how to use GitHub); it might be helpful to broaden your module in the community.

Best wishes.
I will look into this next. Especially since modifying the Mutliplayer SubModule.xml is no longer necessary. Thanks!
 
V1.0.1.2 Change Notes
  • Added settings.json to modify previously hard coded settings
  • Added a fix for an issue that would cause the server to be disconnected from the master server
  • Added a second log that allows tracking of the messages from the above fix
 
V1.0.2.0 Change Notes
  • Two known crashes have been fixed by TW, so their corresponding patches have been removed. Thanks TW Development Team!
I have not looked into a new installer yet. Had Thanksgiving in the US last week and it is crunch time at work. Will try and get to that soon
 
Back
Top Bottom