StrangeLoopGames / EcoIssues

131 stars 21 forks source link

I get disconnected from the server when a new player join. #20416

Closed salix-d closed 3 years ago

salix-d commented 3 years ago

I get disconnected from the server when a new player join. Not sure if it's when any new player joins or just once in a while, wasn't paying attention to logins, but it happened 3 time just today.

Joined are the error logs of the second and third time. Also, for some reason it only happens to me on my server... UnlogmeWhenSomeone Connects.txt

IcedForge commented 3 years ago

@salix-d Thank you for reporting, it looks like there is a lot of misc modded content errors happening in relation to both DB entries and items themselves, please make sure to remove any modded content when this occurs to test this properly as we have a policy of not supporting mods when troubleshooting as we cannot guarantee this is not a problem from the non standard objects as cascading problems can manifest in a lot of different ways.


<size=60.00%>Exception: ArgumentException
Message:An element with the same key but a different value already exists. Key: Nectarine
Source:System.Collections.Immutable

System.ArgumentException: An element with the same key but a different value already exists. Key: Nectarine
   at System.Collections.Immutable.ImmutableDictionary`2.HashBucket.Add(TKey key, TValue value, IEqualityComparer`1 keyOnlyComparer, IEqualityComparer`1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result)
   at System.Collections.Immutable.ImmutableDictionary`2.Add(TKey key, TValue value, KeyCollisionBehavior behavior, MutationInput origin)
   at System.Collections.Immutable.ImmutableDictionary`2.Add(TKey key, TValue value)
   at Eco.Core.Utils.ImmutableHelper.ApplyImmutable[T](T& original, Func`2 apply)
   at Eco.Shared.Utils.BidirectionalMap`2.Add(TKey key, TVal val)
   at Eco.Shared.Utils.DictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary`2 dict, TKey key, Func`1 addFunc)
   at Eco.Core.Utils.CoreReflectionUtils.<>c__DisplayClass18_0`2.<FuncMethodHelper>b__0(TTarget target)
   at Eco.Core.Controller.ControllerManager.PackageProperty(IMvcNetClient boundClient, IController controller, ISyncPropertyInfo propertyInfo)
Outer Exceptions:
Error during packaging property 'NameToObj' of 'Eco.Core.Systems.Registrar'
Error during packaging property 'PlayerMinimapId' of 'Eco.Gameplay.Players.User'</size>
EcoEngine.Logging.LogManager:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
NetworkManager:OnClientDisconnected(String)
System.Action`1:Invoke(T)
Eco.Shared.Networking.NetworkClient:HandleDisconnect(String)
UnityEngine.Experimental.Audio.SampleFramesHandler:Invoke(AudioSampleProvider, UInt32)
Eco.Networking.ENet.ENetUdpClient:OnDisconnected(ENetConnection, DisconnectReason)
Eco.Networking.ENet.ENetUdpPeer:HandleEvent()
Eco.Networking.ENet.ENetUdpPeer:Service(Int32)
<>c__DisplayClass63_0:<Initialize>b__0()
Steamworks.RulesRefreshComplete:Invoke()
System.Action`1:Invoke(T)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
Steamworks.RulesRefreshComplete:Invoke()
mirasrael commented 3 years ago

It isn't related to Mods. Just thread-safety issue with incorrect implementation/usage of ThreadSafeBidirectionalMap

salix-d commented 3 years ago

Good to know! I won't bother the mod's devs in that case.