Why is the function ServerUpdateState of ChaosVehicleMovementComponent flagged reliable?

Hey everyone,
I just started implementing network functionality in a project where I use the ChaosVehicleMovementComponent for my vehicles. It is working in principle, but after a few minutes (or seconds) the server crashes with the following error:

[2022.03.22-15.48.17:889][121]LogNetSerialization: Error: FBitWriter overflowed! (WriteLen: -1, Remaining: 7625, Max: 7625)
[2022.03.22-15.48.17:889][121]LogNet: Warning: Closing connection. Can't send function 'ServerUpdateState' on 'WheeledTankMovementComponent /Game/Testmap.Testmap:PersistentLevel.MGS_CPP_5.WheeledTankMovement': Reliable buffer overflow. FieldCache->FieldNetIndex: 4 Max 5. Ch MaxPacket: 1024.

(where WheeledTankMovementComponent is derived from ChaosVehicleMovementComponent)

So I searched for the ServerUpdateState function in ChaosVehicleMovementComponent.h and saw that it was indeed flagged as ā€˜reliableā€™. And a look into the .cpp file confirmed, that it is called every tick. Thatā€™s just asking for a package overflow, isnā€™t it?

Now of course, I could just edit the original ChaosVehicleMovementComponent.h for the replication to be unreliable and recompile, but I first wanted to ask you guys: Am I overlooking something here? I noticed, that the same function is marked reliable in the original (non chaos) VehicleMovementComponent.h, so I guess itā€™s not just a mistake in the experimental vehicle plugin. Still I canā€™t see how this is supposed to work, without overflowing the server with messages.

Looking forward to your input! Thanks for reading!

Chaos Vechicle Plugin is still in beta, but that sounds wierd to me. i also have problem with the Max RPM, it uses 4500 on clients. Look its far away from production ready yet.

It should be unreliable. It being reliable is a crash waiting to happen as soon as your framerate gets a bit too high, nevermind the fact that itā€™s probably choking everything else for available bandwidth too.

The code in that class is absolutely not production ready, the same can be said of the movement component that came before it.

You can ā€œimproveā€ it by making it unreliable, but also by heavily throttling itā€™s send rate. Sending at tick rate is ridiculous.

Thanks for your answers. I ended up implementing my own UpdateState Method, that calls an unreliable variant of ServerUpdateState.

Sounds like a good solution. They will fix some network issues in UE5.1, see here Unreal Engine Issues and Bug Tracker (UE-144539)

But i canā€™t find a Bug report for the unreliable thing, mb create a bug report for that, too, or did you already do that? When yes, do you have a bug report no. for me so i can track that?
I also fixed it in c++ but canā€™t compile the plugin for some reasons.

I didnā€™t create a bug report yet, as I was not sure it really is a bug.

As for your problem with recompiling the plugin: I didnā€™t try to recompile the vehicle plugin. Instead I inherit from ChaosVehicleMovementComponent in my project and simply override the method there. This (hopefully) ensures that I can use future versions of the plugin with my code.

1 Like

Oh man, thats a good solution, donā€™t know why i m not do that like that! thank you for the hint.
Let me know when u recive the bug report id, so that i can track that too <3

The bug tracker said its fixed, but it is not fixed at all, still 30 km/h on client server model :frowning: