com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

InvalidOperationException: Nullable object must have a value.

Open StephenGrosjean opened this issue 1 year ago • 1 comments

Description

When a client join a game this error is showing, but only on 1.9.1 not on 1.8.1. The client is not spawning any network prefab. No other issue than this one at the same time.

Reproduce Steps

Can't find any general step to reproduce.

Actual Outcome

A clear and concise description of what happened and broke.

Environment

  • OS: Windows 10
  • Unity Version: 2022.3.17f1
  • Netcode Version: 1.9.1

Additional Context

System.Nullable`1[T].get_Value () (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
Unity.Netcode.NetworkObject.HostCheckForGlobalObjectIdHashOverride () (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkObject.cs:2040)
Unity.Netcode.NetworkObject.GetMessageSceneObject (System.UInt64 targetClientId) (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkObject.cs:1764)
Unity.Netcode.SceneEventData.WriteSceneSynchronizationData (Unity.Netcode.FastBufferWriter writer) (at ./Library/PackageCache/[email protected]/Runtime/SceneManagement/SceneEventData.cs:530)
Unity.Netcode.SceneEventData.Serialize (Unity.Netcode.FastBufferWriter writer) (at ./Library/PackageCache/[email protected]/Runtime/SceneManagement/SceneEventData.cs:476)
Unity.Netcode.SceneEventMessage.Serialize (Unity.Netcode.FastBufferWriter writer, System.Int32 targetVersion) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/Messages/SceneEventMessage.cs:15)
Unity.Netcode.NetworkMessageManager.SendMessage[TMessageType,TClientIdListType] (TMessageType& message, Unity.Netcode.NetworkDelivery delivery, TClientIdListType& clientIds) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:641)
Unity.Netcode.NetworkMessageManager.SendMessage[T] (T& message, Unity.Netcode.NetworkDelivery delivery, System.UInt64 clientId) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:814)
Unity.Netcode.NetworkConnectionManager.SendMessage[T] (T& message, Unity.Netcode.NetworkDelivery delivery, System.UInt64 clientId) (at ./Library/PackageCache/[email protected]/Runtime/Connection/NetworkConnectionManager.cs:1282)
Unity.Netcode.NetworkSceneManager.SynchronizeNetworkObjects (System.UInt64 clientId) (at ./Library/PackageCache/[email protected]/Runtime/SceneManagement/NetworkSceneManager.cs:1839)
Unity.Netcode.NetworkConnectionManager.HandleConnectionApproval (System.UInt64 ownerClientId, Unity.Netcode.NetworkManager+ConnectionApprovalResponse response) (at ./Library/PackageCache/[email protected]/Runtime/Connection/NetworkConnectionManager.cs:823)
Unity.Netcode.ConnectionRequestMessage.Handle (Unity.Netcode.NetworkContext& context) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/Messages/ConnectionRequestMessage.cs:156)
Unity.Netcode.NetworkMessageManager.ReceiveMessage[T] (Unity.Netcode.FastBufferReader reader, Unity.Netcode.NetworkContext& context, Unity.Netcode.NetworkMessageManager manager) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:582)
Unity.Netcode.NetworkMessageManager.HandleMessage (Unity.Netcode.NetworkMessageHeader& header, Unity.Netcode.FastBufferReader reader, System.UInt64 senderId, System.Single timestamp, System.Int32 serializedHeaderSize) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:446)
UnityEngine.Debug:LogException(Exception)
Unity.Netcode.NetworkMessageManager:HandleMessage(NetworkMessageHeader&, FastBufferReader, UInt64, Single, Int32) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:450)
Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue() (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:472)
Unity.Netcode.NetworkManager:NetworkUpdate(NetworkUpdateStage) (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkManager.cs:49)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage(NetworkUpdateStage) (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:192)
Unity.Netcode.<>c:<CreateLoopSystem>b__0_0() (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:215)```

StephenGrosjean avatar Jun 15 '24 16:06 StephenGrosjean

Thank you for reaching out and reporting the issue. We wanted to let you know that we will be releasing NGO version 1.10 soon, which included numerous updates and fixes that may address the problem you've encountered.

Once it's available, please update to this new version and check if the issue persists. Stay tuned.

fluong6 avatar Jun 18 '24 15:06 fluong6

pls i need a fix it totally stop me from advancing on my project

Patthys avatar Dec 01 '24 00:12 Patthys

@Patthys @StephenGrosjean This issue should be resolved in v1.12.0 of NGO. I am closing this issue, but if you happen to run into a similar issue again please feel free to open.

NoelStephensUnity avatar Feb 24 '25 20:02 NoelStephensUnity