Skip to content

NetworkList "EventType.Full" synchronization always sends an empty list on client-side when spawning since commit #24388c4c636544871bfe40d1fccf616751665ade causing next "EventType.Value" to throw an Exception trying to set a value at a given index in an empty internal list.  #1983

@WhippetsAintDogs

Description

@WhippetsAintDogs

Description

The fix to prevent duplicate application (#1917) by @jeffreyrainy introduces a bug where when a client gets the spawn call of an object, the server marks dirty the NetworkList's base.IsDirty() causing the NetworkList's next WriteDelta to enter the if sending the EventType.Full which is using the modified WriteField that sends value from m_ListAtLastReset instead of m_List. Since m_ListAtLastReset is empty upon spawning the NetworkList's NetworkObject because no ResetDirty has happened yet, the client will receive an empty list and further EventType.Value will throw by trying to set the value in an empty m_List.

Environment

  • OS: Windows 10
  • Unity Version: 2020.3.16f1
  • Netcode Version: develop branch, commit #24388c4c636544871bfe40d1fccf616751665ade

Metadata

Metadata

Assignees

Labels

priority:mediumThis issue has medium priority and may take some time to be resolvedstat:importStatus - Issue is going to be saved internallytype:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions