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 Performance Tick Data null exception

Discussion in 'Multiplayer' started by Altalus06, Aug 31, 2021.

  1. Altalus06

    Altalus06

    Joined:
    Sep 3, 2017
    Posts:
    12
    Hi,

    I found a small bug: when I launch the game in Unity editor, I have a NullReferenceException on the very first frame

    upload_2021-8-31_9-48-2.png

    the problem occurs in this method of the class "ProfilerCountersInfo" because the tickData object is null (and null state not checked in this method).

    Code (CSharp):
    1. private static void OnPerformanceTickData(PerformanceTickData tickData)
    2.         {
    3.             // Operations
    4.             k_ConnectionsCounterValue.Value = tickData.GetData(ProfilerConstants.NumberOfConnections);
    5.             k_TickRateCounterValue.Value = tickData.GetData(ProfilerConstants.ReceiveTickRate);
    This bug is not blocking (the game works, there is just the exception on the first frame) and do not occurs every time (I have the bug server side, but not client side).

    For information, this bug succeed after updating my unity version from 2020.1.17f1 to 2021.1.10f1.
     
  2. DasOhmoff

    DasOhmoff

    Joined:
    Nov 8, 2018
    Posts:
    11
    I have this very same problem. It happens with the MLAPI package