Bug: NetCode 0.5.0-preview.5: Large serverTick prediction error. Server tick rollback to # delta.

Disregard. This ended up being an issue in my Entites.ForEach, but misreported as the above.

Yes, happens to me also but turning off burst compilation resolves the issue for me. 0.4 used to work correctly with burst but 0.5 just introduced this error(burst-only) and i followed the upgrade guide too. Is there anything else to upgrade?

1 Like

me too. same as Usman

1 Like

I only get this for the first frame with Burst and 0.5

I only saw this happening when the ClientServerTickRate component on my Client did differ from the Server one.

1 Like

This actually ended up being an issue on my Surface Book with Performance Base. The gaming video card was disconnected, and the crappy video card in the ‘tablet’ half of the laptop couldn’t keep up with the physics simulation.

The issue has also been reported

here: Issues with netcode 0.5
here: Unity DOTS NetCode getting started issues
and here: DOTS Multiplayer discussion page-5#post-6554188

@Enzi @Lukas_Kastern were you able to figure out the cause of the issue? (cc @timjohansson )

1 Like

when doing prediction this error was happening but taking deltaTime from
GhostPredictionSystemGroup.Time.DeltaTime instead of Time.deltaTime fixed my issue.

1 Like

Good find, although it’s weird as the samples use Time.deltaTime and they should be the same. I get one prediction error when the character is loading in so I was ignoring it. (I think only the spawn position is wrong at first, which is to be expected)

@UsmanMemon thank you!

Wow this sounds like easy fix and it might fix the issue. I’ll give it a try tomorrow. Thanks!

1 Like

Ok I tried and no luck. I tried to remove all the code related to input handling, turned burst off, jobs off and also removed code off from player moving on the getting started with version 0.5 and it still gives those errors. Even tried to change the player prediction mode to interpolated. The only thing that was left was the logic for spawning cube player and the logic for handling go in game events and server start.

My conclusion is that the prediction error must come from the system and not from the player.

Take a look at the NetDbg. (Found in the multiplayer menu coming with NetCode) It runs in a website and you can check prediction errors there to see which data is actually mispredicted.

@Enzi This is what I get. I get the prediction errors even if I remove the code in sample input script and move CubeSystem scripts. The only way to prevent the system from giving these errors is to uncomment following line.

PostUpdateCommands.AddComponent(req, new SendRpcCommandRequestComponent {TargetConnection = ent});

Which I understand prevents the client from sending commands to server.

Are you using vsync or Application.targetFrameRate = 60 ?
There are no real prediction errors visible, client just might be too far ahead.

The line you pasted is a component to send the req as RPC to the connection ent. It doesn’t mean much without context. (Read the docs)

@Enzi “Are you using vsync or Application.targetFrameRate = 60 ?
There are no real prediction errors visible, client just might be too far ahead.”

Not using and vsync doesn’t seem to affect the errors.

“The line you pasted is a component to send the req as RPC to the connection ent. It doesn’t mean much without context. (Read the docs)”
I know read my comment. I just stated that the only way to prevent the errors is to prevent client from communicating with the server. xD

@mikaelK have you upgraded your systems
Upgrade guide

  • The systems adding input to the ICommandData buffer needs to be moved to GhostInputSystemGroup

Sorry but this was’nt what fixed my issue. I dont know what did at the time.

Its a bug alright. I just redid the NetCode getting started, got it working and its broken again. Try dot net 4.0 or il2cpp. That one broke it for me. Also I tried porting the working netcode to my project without changes and started getting these errors again. I have made like 2-4 bug reports on the issue and many more surrounding it.

Also just playing around with settings seems to spawn lot of these errors.Sorry to say this, but my conclusion is that the 0.5 NetCode cannot be used for anything right now. Its very fragile for all kinds of errors.

Edit. Ok I take that IL2CPP back. IL2cpp works with my original working getting started project and its fine, but not if I try to bring openvr, game code and plugins… I guess openvr and combination of other stuff is the thing that is breaking the netcode for me