RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Dynamic Save Strategy Exception

mumuboy

Sorceror
Somehow, with no change to the guild code, I got this exception using dynamic save strategy:

Exception:
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Server.Guilds.Guild.Serialize(GenericWriter writer)
at Server.DynamicSaveStrategy.<SaveGuilds>b__e(BaseGuild guild, ParallelLoopState state, QueuedMemoryWriter writer)
at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource,TLocal](IEnumerable`1 source, Func`1 localInit, Func`4 body, Action`1 localFinally)
at Server.DynamicSaveStrategy.SaveGuilds()
at Server.DynamicSaveStrategy.Save(SaveMetrics metrics, Boolean permitBackgroundWrite)
at Server.World.Save(Boolean message, Boolean permitBackgroundWrite)
at Server.Misc.AutoSave.Save(Boolean permitBackgroundWrite)
at Server.Timer.Slice()
at Server.Core.Main(String[] args)
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Server.Guilds.Guild.Serialize(GenericWriter writer)
at Server.DynamicSaveStrategy.<SaveGuilds>b__e(BaseGuild guild, ParallelLoopState state, QueuedMemoryWriter writer)
at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )<---

Using .NET Framework 4.0. Was using DualStrategy before. Odd thing is, Dynamic Save works fine on the test machine which is also a quad core. Difference between the production and test bed being that players were logged into the production when this occurred.

Ideas?
 

mumuboy

Sorceror
I could change all serializations of List<> to use lambda syntax like HashSets but I doubt this will solve the underlying issue (whatever that is).
 
Top