Piggy3590 / LC_Office

2 stars 0 forks source link

LethalNetworkAPI Version 2.1.5 Breaks Shrimp #12

Closed Wolfcl0ck closed 7 months ago

Wolfcl0ck commented 7 months ago

LethalNetworkAPI v2.1.5 causes a fatal error with Shrimp that freezes the game.

According to my friend, this did not happen when he recently tested Shrimp, meaning that the issue was not present in LethalNetworkAPI v2.1.4.

When Shrimp walks up to the player and plays a noise, the game will instantly freeze, lagging at a rate of 1 frame every 3 or 4 seconds.

The following Error is outputted to the BepinEx Console:

Stack trace:
Unity.Netcode.NetworkObjectReference..ctor (UnityEngine.GameObject gameObject) (at <895801699cfc4b4ab52267f31e2a4998>:IL_001E)
Unity.Netcode.NetworkObjectReference.op_Implicit (UnityEngine.GameObject gameObject) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
LethalNetworkAPI.Serializable.GameObjectFormatter.Write (UnityEngine.GameObject& value, OdinSerializer.IDataWriter writer) (at ./Serializable/NetworkObjectFormatter.cs:43)
OdinSerializer.MinimalBaseFormatter`1[T].Serialize (T value, OdinSerializer.IDataWriter writer) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/MinimalBaseFormatter.cs:75)
OdinSerializer.MinimalBaseFormatter`1[T].OdinSerializer.IFormatter.Serialize (System.Object value, OdinSerializer.IDataWriter writer) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/MinimalBaseFormatter.cs:87)
OdinSerializer.ComplexTypeSerializer`1[T].WriteValue (System.String name, T value, OdinSerializer.IDataWriter writer) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
OdinSerializer.Serializer`1[T].WriteValue (T value, OdinSerializer.IDataWriter writer) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/Serializer.cs:316)
OdinSerializer.ListFormatter`1[T].SerializeImplementation (System.Collections.Generic.List`1[T]& value, OdinSerializer.IDataWriter writer) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/ListFormatter.cs:129)
UnityEngine.Debug:LogException(Exception)
OdinSerializer.CustomLogger:LogException(Exception) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Misc/CustomLogger.cs:82)
OdinSerializer.DebugContext:LogException(Exception) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Misc/SerializationConfig.cs:252)
OdinSerializer.ListFormatter`1:SerializeImplementation(List`1&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/ListFormatter.cs:133)
OdinSerializer.BaseFormatter`1:Serialize(List`1, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:307)
OdinSerializer.BaseFormatter`1:OdinSerializer.IFormatter.Serialize(Object, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:163)
OdinSerializer.ComplexTypeSerializer`1:WriteValue(String, List`1, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
System.Object:Dynamic_Write_GameNetcodeStuff.PlayerControllerB(PlayerControllerB&, IDataWriter)
OdinSerializer.RuntimeEmittedFormatter`1:WriteDataEntries(PlayerControllerB&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/FormatterEmitter.cs:120)
OdinSerializer.EasyBaseFormatter`1:SerializeImplementation(PlayerControllerB&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/EasyBaseFormatter.cs:59)
OdinSerializer.BaseFormatter`1:Serialize(PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:307)
OdinSerializer.BaseFormatter`1:OdinSerializer.IFormatter.Serialize(Object, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:163)
OdinSerializer.ComplexTypeSerializer`1:WriteValue(String, PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
OdinSerializer.Serializer`1:WriteValue(PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/Serializer.cs:316)
OdinSerializer.ArrayFormatter`1:SerializeImplementation(PlayerControllerB[]&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/ArrayFormatter.cs:102)
OdinSerializer.BaseFormatter`1:Serialize(PlayerControllerB[], IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:307)
OdinSerializer.BaseFormatter`1:OdinSerializer.IFormatter.Serialize(Object, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:163)
OdinSerializer.ComplexTypeSerializer`1:WriteValue(String, PlayerControllerB[], IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
System.Object:Dynamic_Write_StartOfRound(StartOfRound&, IDataWriter)
OdinSerializer.RuntimeEmittedFormatter`1:WriteDataEntries(StartOfRound&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/FormatterEmitter.cs:120)
OdinSerializer.EasyBaseFormatter`1:SerializeImplementation(StartOfRound&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/EasyBaseFormatter.cs:59)
OdinSerializer.BaseFormatter`1:Serialize(StartOfRound, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:307)
OdinSerializer.BaseFormatter`1:OdinSerializer.IFormatter.Serialize(Object, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:163)
OdinSerializer.ComplexTypeSerializer`1:WriteValue(String, StartOfRound, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
System.Object:Dynamic_Write_GameNetcodeStuff.PlayerControllerB(PlayerControllerB&, IDataWriter)
OdinSerializer.RuntimeEmittedFormatter`1:WriteDataEntries(PlayerControllerB&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/FormatterEmitter.cs:120)
OdinSerializer.EasyBaseFormatter`1:SerializeImplementation(PlayerControllerB&, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/EasyBaseFormatter.cs:59)
OdinSerializer.BaseFormatter`1:Serialize(PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:307)
OdinSerializer.BaseFormatter`1:OdinSerializer.IFormatter.Serialize(Object, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Formatters/BaseFormatter.cs:163)
OdinSerializer.ComplexTypeSerializer`1:WriteValue(String, PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:648)
OdinSerializer.Serializer`1:WriteValue(PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Serializers/Serializer.cs:316)
OdinSerializer.SerializationUtility:SerializeValue(PlayerControllerB, IDataWriter) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Misc/SerializationUtility.cs:208)
OdinSerializer.SerializationUtility:SerializeValue(PlayerControllerB, Stream, DataFormat, SerializationContext) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Misc/SerializationUtility.cs:355)
OdinSerializer.SerializationUtility:SerializeValue(PlayerControllerB, DataFormat, SerializationContext) (at /home/runner/work/OdinSerializerThunderstore/OdinSerializerThunderstore/OdinSerializer/Core/Misc/SerializationUtility.cs:444)
LethalNetworkAPI.Serializable.LethalNetworkSerializer:Serialize(PlayerControllerB) (at ./Serializable/LethalNetworkSerializer.cs:13)
LethalNetworkAPI.LethalNetworkVariable`1:SendUpdate() (at ./Variable/LethalNetworkVariable.cs:161)
LethalNetworkAPI.LethalNetworkVariable`1:OnNetworkTick() (at ./Variable/LethalNetworkVariable.cs:188)
Unity.Netcode.NetworkTickSystem:UpdateTick(Double, Double)
Unity.Netcode.NetworkTimeSystem:UpdateTime()
Unity.Netcode.NetworkManager:NetworkUpdate(NetworkUpdateStage)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage(NetworkUpdateStage)
Unity.Netcode.<>c:<CreateLoopSystem>b__0_0()

Obviously, this problem is a result of LethalNetworkAPI updating to change serialization settings and will hopefully be fixed on their end, but I wanted to report it here first anyway so that you know what happened.

Wolfcl0ck commented 7 months ago

Closed. The issue that caused this error has been fixed on LethalNetworkAPI's end with v2.1.6.