Skip to content

Several classes have finalizers which interact with not threadsafe CollectionCaches or Unity APIs #1049

Description

@mattking-mpg

FishNet Version: 4.7.2
Unity Version: 6000.3.2f1

Finalizers run on their own thread and are not threadsafe. Unity's documentation says to not use them.

Several classes have finalizers which call out to CollectionCaches which is not threadsafe or to Unity APIs from the finalizer thread.

  • SyncList
  • UniversalTickSmoother
  • PredictionRigidbody
  • PredictionRigidbody2D
  • SyncDictionary
  • SyncHashSet
  • TransformTickSmoother

We're investigating List<NetworkBehaviour> leaks. After one game server instance loads and unloads ~500 hundred scenes it has ~100,000 List<NetworkBehaviour> and ~10k List<NetworkObjects>. We're still trying to determine where that leak actually comes from. Isolating out threading issues would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions