Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question OverflowException: t on client

Discussion in 'Netcode for GameObjects' started by viktor_unity855, Apr 1, 2022.

  1. viktor_unity855

    viktor_unity855

    Joined:
    Jan 11, 2022
    Posts:
    5
    So I'm getting these errors randomly on clients using the 1.0.0-pre.6 version of netcode for gameobjects. Is there any way to debug this or any known common mistakes in how you set things up that leads to this issue?

    Code (CSharp):
    1. OverflowException: t = -0.126204 but must be >= 0. range 0.0366905444394661, RenderTime 377.922721211209, Start time 377.927351705907, end time 377.964042250346
    2.   at Unity.Netcode.BufferedLinearInterpolator`1[T].Update (System.Single deltaTime, System.Double renderTime, System.Double serverTime) [0x00079] in ...\Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.6\Components\Interpolator\BufferedLinearInterpolator.cs:189
    3.   at Unity.Netcode.Components.NetworkTransform.Update () [0x00136] in ...\Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.6\Components\NetworkTransform.cs:900
    I start a server/host from a menu scene and load into a level in single mode using the NetworkManager.Scenemanager.
    The things I have in the scenes right now is 15 entities with these networked components (NetworkObject, NetworkTransform, NetworkRigidBody).

    When a client connects I spawn an networked object with these networked components (NetworkObject, NetworkTransform) from the server/host using SpawnAsPlayerObject.

    The 15 networked scene objects are moved with a NavMeshAgent on the server/host side and everything looks fine. But as I said at random times there is a bunch of errors spewing out in the log.
     
    crgKlaas likes this.
  2. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    The errors here are likely caused by a bug internally in the NetworkTransform and should not happen. I don't think it's your code doing something wrong here but rather a bug on our side. If you can figure out a way to reproduce it could you please report a bug on our Github and we'll look into fixing this.
     
  3. viktor_unity855

    viktor_unity855

    Joined:
    Jan 11, 2022
    Posts:
    5
    Sorry for the late reply,

    I tried making a slim repo case for this but the only way I got the exception in a smaller scale case ("No actual game running") was by inserting micro stutters on the host. So it feels like it could be frame rate dependent and maybe I clicked in a window or something in the inspector and that triggered something.