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!

Fully working CrashGuard.cs

Voran

Wanderer
Fully working CrashGuard.cs

The distro CrashGuard won't correctly restart the server when it crashes, since it leaves the old server open. Not the biggest use if it happens in the middle of the night, since anyone trying to log in is still being caught by the open server.
This update will CLOSE the crashed server when it restarts.

The crash guard should not be relied on to solve all your crash woes. Fixing the buggy script is still the best option!

Instalation
Overwrite the distro file in Scripts/Misc
 

Attachments

  • CrashGuard.cs
    6.4 KB · Views: 420

Thraxus

Sorceror
Maybe I'm wrong, but shouldn't..

Code:
	else if ( RestartServer )
		Restart( e );
.. actually be..

Code:
	if ( RestartServer )
		Restart( e );
.. ?

The way it is now, as seen below, it would seem that if GenerateReport is true, then the Restart() function will never be called, and the shard won't restart...

Code:
	if ( GenerateReport )
		GenerateCrashReport( e );
			
	else if ( RestartServer )
		Restart( e );
 

telekea

Wanderer
This crash guard does not work either.

I have had 3-4 different crashes recently since installing this crash guard and the server window did not close, and did not even reboot like the distro one does.
 

Voran

Wanderer
That's very strange, since it's working fine on mine and has done for many deliberate crashes (and one accidental).
Post the Crashlog you're using.
 

Thraxus

Sorceror
Its been working fine for me. You did download the updated one with the fix I pointed out to Voran, and not the original one he posted.. right? ;)
 

Joeblow

Wanderer
It works fine for mine too. I have had about 6 crashes. and it worked like a charm. The only down side is you have to remember to look at the crash logs to see if you had a crash. Thats why mine crashed so much I wasn't watching the logs. Once I saw them I got it fixed.

Thanks for the awesome script.
 

telekea

Wanderer
Please ignore my previous post. This was occuring before Voran made the small fix to the crashguard.cs file. I have not crashed since, but I would assume the reason it was not rebooting was because I did not have Voran's small fix.

Thanks.
 

Daene

Wanderer
My distro crashguard doesnt restart the shard on crash, just leaves 2 clients open and no one can connect, Im using 2.0
 

Vorspire

Knight
*Thread Necro*

Reason: Valid Point

Script:
Code:
CrashGuard.cs

Fix:
Code:
Core.Process.Kill();

In Method:
Code:
private static void Restart( CrashedEventArgs e )
{
	[color=green]//code[/color]
}

One Line To Fix It All.
 
Top