zunath / SWLOR_NWN

Star Wars: Legends of the Old Republic server code, a persistent world for Neverwinter Nights
40 stars 98 forks source link

Spawn Processor: Exception & Vars not set #222

Closed zunath closed 6 years ago

zunath commented 6 years ago

The spawn processor errored out and I think resulted in one or more resources not getting the proper variables set. Exception is below.

EXCEPTION:

Exception type: System.InvalidOperationException Message : Sequence contains more than one matching element Stacktrace: at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x0004a] in <9cf10939da67463f9bbe1799644fd07e>:0 at SWLOR.Game.Server.Service.ObjectVisibilityService.ApplyVisibilityForObject (SWLOR.Game.Server.GameObject.NWObject target) [0x0015b] in :0 at SWLOR.Game.Server.Processor.SpawnProcessor+<>cDisplayClass7_0.b1 (SWLOR.Game.Server.Service.Contracts.IObjectVisibilityService ovs) [0x0000d] in :0 at SWLOR.Game.Server.App.Resolve[T] (SWLOR.Game.Server.App+AppResolveDelegate`1[T] action) [0x00037] in :0 at SWLOR.Game.Server.Processor.SpawnProcessor.ProcessSpawn (SWLOR.Game.Server.ValueObject.ObjectSpawn spawn, System.Int32 objectType, SWLOR.Game.Server.GameObject.NWArea area, System.Boolean forceSpawn) [0x00368] in :0 at SWLOR.Game.Server.Processor.SpawnProcessor.Run (System.Object[] args) [0x00267] in :0 at SWLOR.Game.Server.Service.ObjectProcessingService+<>cDisplayClass7_0.b0 (SWLOR.Game.Server.Processor.Contracts.IEventProcessor processor) [0x00012] in :0 at SWLOR.Game.Server.App.ResolveByInterface[T] (System.String typeName, SWLOR.Game.Server.App+AppResolveDelegate`1[T] action) [0x0006d] in :0 at SWLOR.Game.Server.Service.ObjectProcessingService.RunProcessor () [0x0009a] in :0

zunath commented 6 years ago

Forgot to filter on both player ID AND visibility object ID. D'oh. This should be fixed now.