Hello,
I am in the process of porting to 2020.1 from 2019.3 (I need some of the new 2020 features for my project).
Everything seems to have gone fine so far, except for this error (Log dump Below).
I am using UNET, I haven’t migrated away yet.
I have converted both my server and client apps to 2020.1, both of them run with no issues other than this one.
My Old (2019.3) server app works fine with my new (2020.1) client app, so I am guessing that the issue occurs on the server?
The only change I made was when I ported I ran into an error about “Deterministic compilation failed”, which I solved by updating the HLAPI version to 1.0.6 from 1.0.4. Could this have caused the error?
This issue occurs in the console several times, and prevents communication with the server. The line that it complains about (In mainserver.cs) is:
persistentobjectinfomsg msg = netMsg.ReadMessage();
All of the readbyte errors occur on a “readmessage” line.
I have done some searching, and I have already tried adding “seekzero” before readmessage, and I have tried using try/catch blocks, neither of these solutions has worked.
Can anyone shed any light on this?
Thanks!
IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:0 pos:0
UnityEngine.Networking.NetBuffer.ReadByte () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkBuffer.cs:38)
UnityEngine.Networking.NetworkReader.ReadByte () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkReader.cs:260)
UnityEngine.Networking.NetworkReader.ReadPackedUInt32 () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkReader.cs:146)
persistentobjectinfomsg.Deserialize (UnityEngine.Networking.NetworkReader reader) (at <2dc18888417d44478793688727add9cf>:0)
UnityEngine.Networking.NetworkMessage.ReadMessage[TMsg] () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/UNetwork.cs:330)
mainserver.loadnavobject (UnityEngine.Networking.NetworkMessage netMsg) (at Assets/Scripts/SERVER/mainserver.cs:1932)
UnityEngine.Networking.NetworkConnection.HandleReader (UnityEngine.Networking.NetworkReader reader, System.Int32 receivedSize, System.Int32 channelId) (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkConnection.cs:733)
UnityEngine.Networking.NetworkConnection.HandleBytes (System.Byte[] buffer, System.Int32 receivedSize, System.Int32 channelId) (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkConnection.cs:670)
UnityEngine.Networking.NetworkConnection.TransportReceive (System.Byte[] bytes, System.Int32 numBytes, System.Int32 channelId) (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkConnection.cs:896)
UnityEngine.Networking.NetworkClient.Update () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkClient.cs:991)
UnityEngine.Networking.NetworkClient.UpdateClients () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkClient.cs:1262)
UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkIdentity.cs:1245)
UnityEngine.Networking.NetworkCallbacks.LateUpdate () (at Library/PackageCache/com.unity.multiplayer-hlapi@1.0.6/Runtime/NetworkCallbacks.cs:11)