Skip to content

Setting all NetworkObjects to invisible causes BufferOverflow error #1445

@vikpek

Description

@vikpek

Describe the bug
When returning false for all CheckObjectVisibility checks on all NetworkObjects a OverflowException: Could not deserialize SceneObject: Out of buffer space. error occurs.

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/Twin-Drums/MLAPI.Testing.Public
  2. Switch to the branch buffer-overflow-report (the branch contains a clean new Netcode 1.0.0 project - and is not upgraded from a MLAPI project)
  3. Open MLAPI.Testing.Public and MLAPI.Testing.Public.Hardcopy
  4. Open the scene Server in one and Client in the other project
  5. Press play in the server scene, wait until it started and then press play in the client scene
  6. Check the client console for Out of buffer space. error

Actual outcome
Client throws a OverflowException: Could not deserialize SceneObject: Out of buffer space. error (see screenshot below).

Expected outcome
No error should appear only because all NetworkObjects are invisible.

Screenshots
grafik

Environment:

  • OS: Windows 10
  • Unity Version: 2020.3.22f1
  • Netcode Version: 1.0.0-pre.3

Additional context
Changing the return value to true in NetworkVisibilityObject in line 30: bool HandleCheckObjectVisibility(ulong clientId) => false; will make the error disappear (and also spawn the objects on the client).

Metadata

Metadata

Assignees

Labels

priority:mediumThis issue has medium priority and may take some time to be resolvedtype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions