Search Issue Tracker

By Design



Found in


Issue ID




[UNET] NetworkWriter.Write causing ReadString/ReadBytes out of range errors in clients




Priority: 3Not yet prioritized for a release


Severity: 0Severity not yet defined

Steps to reproduce:
1) open attached project ""
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 (20)

  1. Fd2ebae5013758068e2292f7c2b81573?d=mm


    Sep 13, 2017 11:29

    By Design? Are you kidding?

  2. 959b3496d8baf03237347f3452b5185a?d=mm


    Aug 30, 2017 04:39

    Wait, this is "by design"? I don't understand.

  3. C93784afe6596724e65d8472c4684588?d=mm


    Aug 01, 2017 19:15

    Good news: I am the guy who found and reported this bug. I decided to fix it myself and add proper error logging. Check out HLAPI Pro:

  4. 9e64427b5cae11a46ede57c10b806d65?d=mm


    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.

  5. 006db45f326995e7926f27cf8412efeb?d=mm


    May 03, 2017 10:42

    It is such an annoying bug..... It alone makes Unity Networking so much worse.

  6. Cee6f8ef6dcd467bf5a98f09b11ca6dd?d=mm


    May 01, 2017 17:40


  7. B2c75f7eea065d2bc4d7a2c56363ab91?d=mm


    Mar 13, 2017 13:26

    Any update on this ? I get it all the time. PLS FIX IT.

  8. C93784afe6596724e65d8472c4684588?d=mm


    Dec 19, 2016 18:15

    For people having this bug, you may want to read through my forum thread too:

  9. Aff1cfe87e97c8abc796469a52839749?d=mm


    Dec 19, 2016 05:47

    When will this be fixed? :(.

  10. B035a9e264198897f95784e4288368b1?d=mm


    Nov 21, 2016 20:16

    Still exists @ 5.4.1f1

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.