Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Other

Other Cant find a category above, use this one! Core mods not listed above go here!

Reply
 
Thread Tools Display Modes
Old 02-21-2006, 02:10 AM   #1 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default Small Main.cs fix

Here's a silly little fix that I just noticed that someone might be interested in.

In RunUO 1.0,
Main.cs Line 628, originally:
Code:
            timerThread.Join();
            Console.WriteLine( "done" );
now, if you compile and run the RunUO server without scripts, or simply fail it somehow, you'll receive a:
System.Threading.ThreadStateException was unhandled
Message="Thread has not been started."
Source="mscorlib"
StackTrace:
at System.Threading.Thread.JoinInternal()
at System.Threading.Thread.Join()
at Server.Core.HandleClosed()
at Server.Core.CurrentDomain_ProcessExit(Object sender, EventArgs e)

here's something that I came up with in five minutes to "fix" this little issue:
Code:
            if (timerThread.ThreadState == System.Threading.ThreadState.Running)
                timerThread.Join();
            else
                timerThread.Abort();
of course, the 2.0 version may have changed this all completely...
*shrug*

Takes care of the Exception at least.
Ohms_Law is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5