Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Transport ID dictionary Key no check error in TransportIdToClientId

Discussion in 'Netcode for GameObjects' started by Altalus06, Apr 5, 2022.

  1. Altalus06

    Altalus06

    Joined:
    Sep 3, 2017
    Posts:
    12
    Hi Unity Team,

    I'm currently working on a huge project using MLAPI 0.1, and wanted to migrate to NFGO.

    The migration process went well, but when testing, sometimes (very episodically), I have an error during the very early connection phase, during the Network Early Update...

    Searching more about this error, I found that the error come from NetworkManager.OnNetworkEarlyUpdate(), during the call to HandleRawTransportPoll

    upload_2022-4-5_9-43-24.png

    Finally, the problem is occuring inside the call to TransportIdToClientId, because inside this method, the m_transportIdToClientIdMap key is not checked.

    upload_2022-4-5_9-44-20.png
    upload_2022-4-5_9-45-22.png
    in this case, it is because I have a transportId witht the value "78", and this key doesn't exists.

    Investigation further more, I found that the problem came from here: the connectionId returned by this method is 77. Very strange (maybe because QoS asset for Unity Multiplay is using a Transport itself, that may create this issue?)

    upload_2022-4-5_9-50-18.png

    In any case, it's really a pity because this little bug prevents me from migrating to NCFGO.

    Cheers,
    Olivier
     

    Attached Files:

  2. luke-unity

    luke-unity

    Unity Technologies

    Joined:
    Sep 30, 2020
    Posts:
    306
    Which transport are you using? UNetTransport?
     
  3. Altalus06

    Altalus06

    Joined:
    Sep 3, 2017
    Posts:
    12
    Yes, UNetTransport.
     
  4. luke-unity

    luke-unity

    Unity Technologies

    Joined:
    Sep 30, 2020
    Posts:
    306
    Could you create an issue here and include steps for how we could reproduce this.
     
unityunity