Search Unity

Bug Ack desync detected (Case 1326809)

Discussion in 'NetCode for ECS' started by Lukas_Kastern, Apr 4, 2021.

  1. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Hey, I started experiencing that interpolation of entities stops in our game when exiting vehicles.

    When looking into that issue I noticed that the ReceivedSnapshotByLocalMask gets set to zero when that bug occurs.

    So after attaching my debugger I found out that line 488 inside the GhostReceiveSystem returns false which has the comment `Ack Desync Detected' next to it.

    The data.baseLineTick the client received was 23429 but the oldest snapshot the client has stored was for tick 23462.

    The other two baseLineTicks were even older by the way.

    Maybe interesting to note is that the serverTick that got passed to DeserializeEntity was 23558 and the latest tick the client had was 23555.

    Anyone got some hints at what I could look at?
     
  2. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    One more thing, I could reproduce this issue in our project when using NetCode version 0.5 and 0.6.
     
  3. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    This only seems to happen when using ghost relevancy. I'm going to try to reproduce this in a minimal example tomorrow.
     
  4. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    It almost looks like the ghost just got skipped for 100 ticks on the server while the client keeps incrementing the baseline ticks.

    The snapshot indices on the server jump in one step from 5796 to 5917.

    So I guess the interesting part would be to figure out why the snapshot indices do stop incrementing on the server while the client keeps pushing the number up.

    I tried to reproduce the issue in one of the multiplayer samples but sadly couldn't manage to do so.

    I'm still very unsure what triggers this behaviour since the only thing that vehicle exit does is tagging the ghost with a new component and changing the value of a child component.

    Maybe the archetype change somehow messes with the relevancy?
     
  5. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Okay, I managed to reproduce it inside the NetCube sample.
    I've submitted a bug report with the project attached (Case 1326809)
     
  6. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    900
    Hey Lukas,
    thanks for filling the case and actually managed to repro it with a simple example. We will have a look at it.
    I suspect is due to one of the issues we already fixed in the upcoming release (I hope that)
     
    Lukas_Kastern likes this.
  7. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    900
    Happy to say that I was able to repro the problem with you test and that the issue has been already fixed in upcoming release of NetCode
     
    Enzi likes this.
  8. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Those are great news, looking forward to the upcoming release!
    Do you have an estimate on when that is gonna drop so I can forward that to my team?
     
    Enzi likes this.