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!

[RunUO 2.0 RC1] Time System

Morxeton

Sorceror
Cheetah2003;662249 said:
Can you tell me what to change where? Don't like my server crashing. :)

Sure thing. I am not quite ready to release the new version, so I should post this anyways :)

In Engine.cs, find the OnSystemTick method, and change the for loop that enumerates through the Data.MobilesTable to this:

Code:
            lock (Data.MobilesTable.SyncRoot)
            {
                foreach (MobileObject mo in Data.MobilesTable.Values)
                {
                    if (mo != null)
                    {
                        mo.Mobile.CheckLightLevels(false);
                    }
                }
            }
That'll take care of the crash bug. :)
 

Morxeton

Sorceror
Cheetah2003;662248 said:
SystemWide = true

EMO's are set to false.

Sound's like it is incorrectly overriding the effect upon entering the EMO, then when removing the nightsight sash and putting it back on, the system does a check again and this time confirms that it's not to be overridden and allows the effect.

I'll attempt to reproduce this, since I was testing with the override set to true.
 

Morxeton

Sorceror
Another bug fix:

If you have any EEMO's set, when the data file is saved and attempted to load again, it will fail since there is an if statement that is incorrectly checking the version.

Find line 591 in Data.cs.

Change this code:
Code:
if (version > 3)

To this code:
Code:
if (version <= 3)

This has been fixed for next version.
 

Pyro-Tech

Knight
i am having the same type of issue as cheetah....i go to a region when it's darkest hour and what not, and nightsight override's it entirely...and the night sight override is there so....

im looking into it to see if i have everything set up properly at the moment
 

Pyro-Tech

Knight
got a crash for ya....happened when i tried to set an emo map to internal to remove it:

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 3/10/2007 12:15:48 AM
Mobiles: 4114
Items: 38075
Clients:
- Count: 1
+ 192.168.1.1: (account =xxxxxxx) (mobile = 0x4 'Pyro-Tech')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.TimeSystem.Support.GetMapFromName(String mapName, Boolean includeInternal)
   at Server.TimeSystem.Custom.SetEmo(String index, String type, String valueOne, String valueTwo)
   at Server.TimeSystem.Commands.TimeSystem_OnCommand(CommandEventArgs e)
   at Server.Commands.CommandSystem.Handle(Mobile from, String text, MessageType type)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Engines.PartySystem.Chat3Guild.UnicodeSpeechChat3(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

is there a way to configure the thing to be used system wide? i had an emo setup, but the moment i walk out of it, it goes to completly different set up. Either be nice to have an easy way to set it up system wide like an emo, or needs a gump/graphic way of setting options....and soon lol

could always work something out like myrunuospawner program or something lol.
 

Morxeton

Sorceror
Pyro-Tech;662304 said:
i am having the same type of issue as cheetah....i go to a region when it's darkest hour and what not, and nightsight override's it entirely...and the night sight override is there so....

im looking into it to see if i have everything set up properly at the moment

Check the system level and EMO level variables to make sure they are both set to true. Also check the reduction level. If you want nightsight to be completely overridden in Darkest Hour, type:

[TS SET UseNightSightDarkestHourOverride true (this is for the system level).
[TS SETEMO <#> UseNightSightDarkestHourOverride true
[TS SETEMO <#> NightSightDarkestHourReduction 100

Setting it to 100% will negate nightsight completely, otherwise you can scale its effectiveness down by setting the % to anything you want.
 

Morxeton

Sorceror
Pyro-Tech;662306 said:
got a crash for ya....happened when i tried to set an emo map to internal to remove it:

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 3/10/2007 12:15:48 AM
Mobiles: 4114
Items: 38075
Clients:
- Count: 1
+ 192.168.1.1: (account =xxxxxxx) (mobile = 0x4 'Pyro-Tech')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.TimeSystem.Support.GetMapFromName(String mapName, Boolean includeInternal)
   at Server.TimeSystem.Custom.SetEmo(String index, String type, String valueOne, String valueTwo)
   at Server.TimeSystem.Commands.TimeSystem_OnCommand(CommandEventArgs e)
   at Server.Commands.CommandSystem.Handle(Mobile from, String text, MessageType type)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Engines.PartySystem.Chat3Guild.UnicodeSpeechChat3(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

is there a way to configure the thing to be used system wide? i had an emo setup, but the moment i walk out of it, it goes to completly different set up. Either be nice to have an easy way to set it up system wide like an emo, or needs a gump/graphic way of setting options....and soon lol

could always work something out like myrunuospawner program or something lol.

Thanks for the bug report! This has been fixed for next version.

The purpose of the system-wide variables such as UseNightSightDarkestHourOverride is to easily enable/disable a feature across the entire system without having to modify any EMOs. However, to take advantage of the effects (like the NightSightDarkestHourReduction), you must use an EMO. Perhaps I could make something like able to set an EMO to be the system-wide EMO, but an EMO with higher priority will still take effect, in which you can just set the priority lower than the system-wide EMO or delete it... I think I'll add that to the todo list. Seasons may not function correctly in certain situations, however...

I do plan to have gumps in the next version or two... :)
 

Cheetah2003

Wanderer
Hate to bring bad news, but I applied that fix to OnSystemTick(), and it crashed again anyway. Code:

Code:
        private static void OnSystemTick()
        {
            TimeEngine.CalculateBaseTime();
            LightsEngine.CheckLights();

			lock (Data.MobilesTable.SyncRoot)
			{
[COLOR="Red"]				foreach (MobileObject mo in Data.MobilesTable.Values)[/COLOR]
				{
					if (mo != null)
					{
						mo.Mobile.CheckLightLevels(false);
					}
				}
			}
        }

Crash: (Line 134 is in red)
Code:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Server.TimeSystem.Engine.OnSystemTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 134
   at Server.TimeSystem.Engine.TimeSystemTimer.OnTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 174
   at Server.Timer.Slice() in d:\source\c#\RunUO\RunUO\Timer.cs:line 507
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 503
 

Morxeton

Sorceror
Cheetah2003;662436 said:
Hate to bring bad news, but I applied that fix to OnSystemTick(), and it crashed again anyway. Code:

Code:
        private static void OnSystemTick()
        {
            TimeEngine.CalculateBaseTime();
            LightsEngine.CheckLights();

			lock (Data.MobilesTable.SyncRoot)
			{
[COLOR="Red"]				foreach (MobileObject mo in Data.MobilesTable.Values)[/COLOR]
				{
					if (mo != null)
					{
						mo.Mobile.CheckLightLevels(false);
					}
				}
			}
        }

Crash: (Line 134 is in red)
Code:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Server.TimeSystem.Engine.OnSystemTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 134
   at Server.TimeSystem.Engine.TimeSystemTimer.OnTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 174
   at Server.Timer.Slice() in d:\source\c#\RunUO\RunUO\Timer.cs:line 507
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 503

Hmm... I think it's because the eventsinks are still modifying the mobiles table without a lock wrapper.

Change both the OnLogin and OnDisconnected eventsinks in Engine.cs to:
Code:
        public static void OnLogin(LoginEventArgs args)
        {
            Mobile mobile = args.Mobile;

            MobileObject mo = new MobileObject();

            mo.Mobile = mobile;

            mo.IsNightSightOn = !mobile.CanBeginAction(typeof(LightCycle));

            lock (Data.MobilesTable.SyncRoot)
            {
                Data.MobilesTable.Add(mobile, mo);
            }
        }

        public static void OnDisconnected(DisconnectedEventArgs args)
        {
            Mobile mobile = args.Mobile;

            lock (Data.MobilesTable.SyncRoot)
            {
                Data.MobilesTable.Remove(mobile);
            }
        }
I hope that resolves the issue. Please let me know if it does not. I will do some testing myself.
 

Cheetah2003

Wanderer
Morxeton;662438 said:
Hmm... I think it's because the eventsinks are still modifying the mobiles table without a lock wrapper.

Change both the OnLogin and OnDisconnected eventsinks in Engine.cs to:
Code:
        public static void OnLogin(LoginEventArgs args)
        {
            Mobile mobile = args.Mobile;

            MobileObject mo = new MobileObject();

            mo.Mobile = mobile;

            mo.IsNightSightOn = !mobile.CanBeginAction(typeof(LightCycle));

            lock (Data.MobilesTable.SyncRoot)
            {
                Data.MobilesTable.Add(mobile, mo);
            }
        }

        public static void OnDisconnected(DisconnectedEventArgs args)
        {
            Mobile mobile = args.Mobile;

            lock (Data.MobilesTable.SyncRoot)
            {
                Data.MobilesTable.Remove(mobile);
            }
        }
I hope that resolves the issue. Please let me know if it does not. I will do some testing myself.

OK applied that fix, will letcha know if anything untoward happens. :) Thanks again for all yer help with this!
 

Cheetah2003

Wanderer
Happened again...

Code:
[Mar 11 19:17:47] Error:
[Mar 11 19:17:49] System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Server.TimeSystem.Engine.OnSystemTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 140
   at Server.TimeSystem.Engine.TimeSystemTimer.OnTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 180
   at Server.Timer.Slice() in d:\source\c#\RunUO\RunUO\Timer.cs:line 507
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 503

Here's the code I modified as you told me: (line 140 is in red)

Code:
        public static void OnLogin(LoginEventArgs args)
        {
            Mobile mobile = args.Mobile;

            MobileObject mo = new MobileObject();

            mo.Mobile = mobile;

            mo.IsNightSightOn = !mobile.CanBeginAction(typeof(LightCycle));

			lock (Data.MobilesTable.SyncRoot)
			{
				Data.MobilesTable.Add(mobile, mo);
			}
        }

        public static void OnDisconnected(DisconnectedEventArgs args)
        {
            Mobile mobile = args.Mobile;

			lock (Data.MobilesTable.SyncRoot)
			{
				Data.MobilesTable.Remove(mobile);
			}
        }

        private static void OnSystemTick()
        {
            TimeEngine.CalculateBaseTime();
            LightsEngine.CheckLights();

			lock (Data.MobilesTable.SyncRoot)
			{
[COLOR="Red"]				foreach (MobileObject mo in Data.MobilesTable.Values)[/COLOR]
				{
					if (mo != null)
					{
						mo.Mobile.CheckLightLevels(false);
					}
				}
			}
        }
 

Morxeton

Sorceror
I discovered how it's happening, but not why. It does not make any damn sense to me.

Basically here's how it's happening, even though the OnSystemTick() is locking the MobilesTable... whenever an EventSink is called, and even though they are designed the same way to LOCK the MobilesTable prior to modification (which if it is currently locked it makes that thread wait until it's available again), it IGNORES the lock and proceeds to modify anyways.

I don't know why it would ignore the lock. However, I have tested this and I had the OnDisconnected EventSink start a timer, in which when the timer ticks, it will lock the MobilesTable and perform the same function that the EventSink was doing. To my disbelief, it freakin' worked that way.

I didn't want to use a timer (even though it would be set to TimeSpan.Zero and execute immediately) to perform this function, I changed the EventSinks to use a queue for logins and a queue for logouts. I created another timer that checks these queues once every 5 seconds and if there's anything in either queue, lock the MobilesTable and process it accordingly.

I also decided to not enumerate through the MobilesTable in the OnSystemTick() method and chose to enumerate through NetState.Instances (like I did in v2.0.0). I still want the queues used for the EventSinks, because there is still potetial for disaster without them being used.

After I finish some code cleanup (optimizations, consolidations, etc...) in Custom.cs (damn file was 158kb), I will be releasing v2.0.4, which contains 12 bug fixes (I found a lot of bugs!).

I was going to wait before releasing the next version so I could create the gumps for the system and gumps for the EvilSpawners, but there are too many bug fixes, some crash bugs.
 

Cheetah2003

Wanderer
Morxeton;662806 said:
I discovered how it's happening, but not why. It does not make any damn sense to me.

Basically here's how it's happening, even though the OnSystemTick() is locking the MobilesTable... whenever an EventSink is called, and even though they are designed the same way to LOCK the MobilesTable prior to modification (which if it is currently locked it makes that thread wait until it's available again), it IGNORES the lock and proceeds to modify anyways.

I don't know why it would ignore the lock. However, I have tested this and I had the OnDisconnected EventSink start a timer, in which when the timer ticks, it will lock the MobilesTable and perform the same function that the EventSink was doing. To my disbelief, it freakin' worked that way.

I didn't want to use a timer (even though it would be set to TimeSpan.Zero and execute immediately) to perform this function, I changed the EventSinks to use a queue for logins and a queue for logouts. I created another timer that checks these queues once every 5 seconds and if there's anything in either queue, lock the MobilesTable and process it accordingly.

I also decided to not enumerate through the MobilesTable in the OnSystemTick() method and chose to enumerate through NetState.Instances (like I did in v2.0.0). I still want the queues used for the EventSinks, because there is still potetial for disaster without them being used.

After I finish some code cleanup (optimizations, consolidations, etc...) in Custom.cs (damn file was 158kb), I will be releasing v2.0.4, which contains 12 bug fixes (I found a lot of bugs!).

I was going to wait before releasing the next version so I could create the gumps for the system and gumps for the EvilSpawners, but there are too many bug fixes, some crash bugs.

Cool. Can't wait. For now, I just did this to at least stop it from crashing. :)

Code:
		private static void OnSystemTick()
		{
			TimeEngine.CalculateBaseTime();
			LightsEngine.CheckLights();

			lock (Data.MobilesTable.SyncRoot)
			{
				try
				{
					foreach (MobileObject mo in Data.MobilesTable.Values)
					{
						if (mo != null)
						{
							mo.Mobile.CheckLightLevels(false);
						}
					}
				}
				catch (InvalidOperationException e)
				{
					Console.WriteLine("TimeSystem.Engine:OnSystemTick() caught an exception: " + e.Message);
				}
			}
		}
 

Morxeton

Sorceror
New version released.

v2.0.4:

  • Added EvilSpawners that will now spawn evil spirits during the darkest hour. You must add the spawners manually using RunUO's [ADD command, then [PROPS to configure their properties. The spawner will only function if you [TS SET UseEvilSpawners true AND the EMO it is located in must have UseEvilSpawners set to true.
  • Fixed [TS ADDEMO and [TS GETEMO # to show all of the properties of the EMO (some were missing).
  • Fixed a bug in the CalculateLightLevel() method where it was not using timezone scaling even if UseTimeZones = true, therefore Darkest Hour, Light Levels, and auto lighting were not functioning as they should (i.e. changing too late).
  • Fixed a bug where if a player logged off right in the middle of a system tick, it would throw an exception because the collection was modified (removing their MobileObject from the hashtable) while the for loop was still enumerating. This has been changed to enumerate through NetState.Instances instead.
  • Added login/logout queues and a timer that checks/manages the queues once every 5 seconds.
  • Made a separate timer for polling the lights (default 5 seconds). The timer speed can me changed by using [TS SET LightsEngineTimerSpeed <value>. This was necessary as changing the master timer speed would also affect how often the lights outage effect in darkest hour.
  • Fixed a bug in the Load() method in Data.cs that was incorrectly checking the version and would result in a failed load attempt everytime.
  • Fixed a bug when wearing an item with nightsight with both UseNightSightDarksetHourOverride and UseNightSightOverride set to true, whichever reduction was a higher % between the NightSightDarkestHourReduction and NightSightLevelReduction would take precedence during the Darkest Hour, when it should always be the NightSightDarkestHourReduction.
  • Fixed a bug in the IsDarkestHour() method that was not checking to see if UseDarkestHour was true/false before returning it's calculation.
  • Fixed a bug when upgrading to a newer version, the default settings were not being set for any new settings introduced in the newer version.
  • Fixed a bug that [TS ADDEMO and [TS ADDEEMO were still defaulting to Map.Internal instead of mobile.Map.
  • Made UseDarkestHour, UseAutoLighting, UseRandomLightOutage, and LightOutageChancePerTick EMO based instead of system-wide.
  • Massive changes made to the lights engine to reflect the new EMO changes, plus some optimizations that reduced CPU usage.
  • Fixed a bug when changing an EMO's map using [TS SETEMO # MAP <map>, if typing an invalid map name it would result in a crash.
  • Added ability to enable/disable an EMO and EEMO. The new commands are [TS TOGGLEEMO <#> and [TS TOGGLEEEMO <#>.
  • Changed the SetVariable() method in Config.cs that is used for checking the variables to CheckVariable().
  • Cleaned up a bunch of code in Custom.cs by consolidating and using Config.CheckVariable() method for checking on variables before assigning them.
  • Fixed a bug when using [TS ClearMonths it would cause the server to crash because no months would exist in the array. I have changed it to remove all but the 1st month.
  • Fixed a bug in the CheckTime() method which was not properly handling the day/month checks and could result in a crash in certain situations.
  • Fixed a bug in the CheckTime() method which would not properly calculate the day/months depending on if you had a huge facet adjustment.
  • Fixed a bug in the CheckAlreadyExistsInArray() method which was not properly checking the array.
  • Changed the MobilesTable from being a Hashtable to a generic Dictionary.
 

Morxeton

Sorceror
About the EvilSpawners...

You will need to add them manually [ADD EvilSpawner and place them whereever you want the evil spirits to spawn. You will need to do [PROPS on the spawner before enabling it. By default, it is disabled. Once you made all your changes, change the Enabled variable to true.

The spawner, once enabled, will auto-activate during the Darkest Hour ONLY if both the system-wide setting "UseDarkestHour" and EMO setting for the EMO it is in is set to true. The system automatically activates the spawner when it is the Darkest Hour, and deactivates it after the Darkest Hour is over.

This is a very generic spawner that it's only purpose is to spawn the evil spirits. I have made the spirits a bit tough, but I have not fully tested them. Feel free to tweak the script if need be and give me any suggestions.

As it is now, the evil spirits will attack anyone. I plan to make an option where you could have it only attack non-reds, thus leaving the PKs alone.
 

Cheetah2003

Wanderer
Crasher in 2.0.4:

(Affected line in red)

Code:
        private class MobileObjectQueueTimer : Timer
        {
            public MobileObjectQueueTimer()
                : base(TimeSpan.Zero, TimeSpan.FromSeconds(5.0))
            {
            }

            protected override void OnTick()
            {
                if (m_LoginQueue.Count > 0 || m_LogoutQueue.Count > 0)
                {
                    lock (Data.MobilesTable)
                    {
                        while (m_LoginQueue.Count > 0)
                        {
                            MobileObject mo = (MobileObject)m_LoginQueue.Dequeue();

[COLOR="Red"]                            Data.MobilesTable.Add(mo.Mobile, mo);[/COLOR]
                        }

                        while (m_LogoutQueue.Count > 0)
                        {
                            Mobile mobile = (Mobile)m_LogoutQueue.Dequeue();

                            Data.MobilesTable.Remove(mobile);
                        }
                    }
                }
            }
        }

Code:
System.ArgumentException was unhandled
  Message="An item with the same key has already been added."
  Source="mscorlib"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
       at Server.TimeSystem.Engine.MobileObjectQueueTimer.OnTick() in C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 225
       at Server.Timer.Slice() in C:\source\c#\RunUO\RunUO\Timer.cs:line 507
       at Server.Core.Main(String[] args) in C:\source\c#\RunUO\RunUO\Main.cs:line 503
       at Server.Core.CoreThread() in C:\source\c#\RunUO\RunUO\Main.cs:line 346
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

To reproduce: Login, then logout, then log back in, rather quickly.
 

Morxeton

Sorceror
Cheetah2003;662857 said:
Crasher in 2.0.4:

(Affected line in red)

Code:
        private class MobileObjectQueueTimer : Timer
        {
            public MobileObjectQueueTimer()
                : base(TimeSpan.Zero, TimeSpan.FromSeconds(5.0))
            {
            }

            protected override void OnTick()
            {
                if (m_LoginQueue.Count > 0 || m_LogoutQueue.Count > 0)
                {
                    lock (Data.MobilesTable)
                    {
                        while (m_LoginQueue.Count > 0)
                        {
                            MobileObject mo = (MobileObject)m_LoginQueue.Dequeue();

[COLOR="Red"]                            Data.MobilesTable.Add(mo.Mobile, mo);[/COLOR]
                        }

                        while (m_LogoutQueue.Count > 0)
                        {
                            Mobile mobile = (Mobile)m_LogoutQueue.Dequeue();

                            Data.MobilesTable.Remove(mobile);
                        }
                    }
                }
            }
        }

Code:
System.ArgumentException was unhandled
  Message="An item with the same key has already been added."
  Source="mscorlib"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
       at Server.TimeSystem.Engine.MobileObjectQueueTimer.OnTick() in C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engine.cs:line 225
       at Server.Timer.Slice() in C:\source\c#\RunUO\RunUO\Timer.cs:line 507
       at Server.Core.Main(String[] args) in C:\source\c#\RunUO\RunUO\Main.cs:line 503
       at Server.Core.CoreThread() in C:\source\c#\RunUO\RunUO\Main.cs:line 346
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

To reproduce: Login, then logout, then log back in, rather quickly.

Ah good catch. I should have had the m_LogoutQueue process first!

I'll hotfix and release 2.0.5 shortly.
 

Morxeton

Sorceror
A new version has been release to address a crash bug.

v2.0.5:

  • Fixed a bug when logging on, then off, then back on rather quickly, the m_LoginQueue would process first and would try to add you back into the MobilesTable when you haven't been removed yet. The m_LogoutQueue will now process first, but also a try/catch wrapper has been placed around MobilesTable.Add to prevent a duplicate key being inserted (it was still possible to crash after changing the order).
 

Pyro-Tech

Knight
kewl to see the evil spawner in place...


heh...funny now looking at alot of the scripts i have, alot are original's of yours lol
 
Top