Search Issue Tracker
By Design
Votes
31
Found in
5.3.4f1
Issue ID
786248
Regression
No
[UNET] NetworkWriter.Write causing ReadString/ReadBytes out of range errors in clients
Steps to reproduce:
1) open attached project "stripped.zip"
2) build and run as "Host"
3) editor as "Client"
Actual: ReadString/ReadBytes error printed
Expected: show errors in OnSerialize/OnDeserialize and point to which GameObject it happened
note: if you are to enable "Scenes/Warrior.prefab" NavMeshAgent component, it works without any errors
Comments (21)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] TouchScreenKeyboard.selection.length always returns "0" when any length text is selected
- Point Light in "LensFlareShowroom" scene of URP Samples uses unsupported Indirect Multiplier
- Video does not play in macOS build when built app is placed in a path with a space in it on a specific project
- Crash on AuxWindowManager::OnGotFocus when trying to maximize a tab while Visual Effect Graph window is open
- “NullReferenceException: Object reference not set to an instance of an object” error is thrown when
LasseNiermann
Jan 11, 2019 23:22
Bug still exists - Unity 2018.3
:(
sebrk_hiq
Sep 13, 2017 11:29
By Design? Are you kidding?
ahung89
Aug 30, 2017 04:39
Wait, this is "by design"? I don't understand.
BenGrob
Jun 02, 2017 14:34
We had this issue while implementing cross-platform multiplayer and ended up resolving it.
The call stack actually contains incorrect information, as it goes directly from OurClassThatDerivesFromNetworkBehaviour.OnDeserialize to NetworkReader.ReadBytes, which isn't called by our code or NetworkBehaviour.OnDeserialize. There are actually operations being performed on synchronized objects (SyncVars, etc) elsewhere, but the location somehow doesn't make it into the call stack (probably native code).
Turns out we had a conditional #if around a SyncVar, which caused a different number of items to serialize/deserialize based on the platform. Removing the conditional fixed it.
shamsfk
May 03, 2017 10:42
It is such an annoying bug..... It alone makes Unity Networking so much worse.
Ronith
May 01, 2017 17:40
!bump
Clawf
Mar 13, 2017 13:26
Any update on this ? I get it all the time. PLS FIX IT.
vis2k
Dec 19, 2016 18:15
For people having this bug, you may want to read through my forum thread too: https://forum.unity3d.com/threads/bug-readstring-too-long-please-show-the-variable-that-caused-it.395692/
tvirus06
Dec 19, 2016 05:47
When will this be fixed? :(.
mercior
Nov 21, 2016 20:16
Still exists @ 5.4.1f1