Try disabling the Async write feature of PowerHour, to do this you need to find and edit this code in the PowerHour main class;

Code:
			States = new BinaryDataStore<Mobile, PowerHourState>(VitaNexCore.SavesDirectory + "/PowerHour", "States")
			{
				OnSerialize = SerializeStates,
				OnDeserialize = DeserializeStates,
				Async = true
			};

Set Async to false, or comment out the line itself.
 
The purpose of Async is to perform the save action in the background, which reduces World Save times.
It is throwing the error because the save is operating on a different thread and something is modifying the collection while it is processing, could likely be the addition or removal of one or more profiles.
 
Maybe a lock or a queue that gets pushed into the list after the lock is lifted would help in that case?
 
The core implementation of my DataStore<TKey, TVal> features should be thread-safe, there must have been an oversight in one or more of the methods used to access and update data. I will investigate it for future reference, but it doesn't seem to be a very common problem as it hasn't happened on the shards that I manage. Obviously there is still a chance and it needs corrected :)

If it doesn't happen consistently on every world save, then the data should be fine even if the save fails.
 
Back