Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 04-03-2005, 07:58 PM   #1 (permalink)
 
Join Date: Jul 2004
Age: 20
Posts: 76
Default Error Report Assistance

Apparently my shard crashed while I was away. Fortunately the wonders of RunUO created a crash report for me. It is as follows:

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

RunUO Version 1.0.0, Build 36918
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.2032
Time: 4/3/2005 6:08:54 PM
Mobiles: 2745
Items: 157119
Clients:
- Count: 6
+ **.**.**.**: (account = *****) (mobile = 0xB3B 'Diplomat Narc')
+ **.**.**.**: (account = *****) (mobile = 0xB3F 'RoXxOr')
+ **.**.**.**: (account = *****) (mobile = 0x9F0 'Keara')
+ **.**.**.**: (account = *****) (mobile = 0x987 'Atomix')
+ **.**.**.**: (account = *****) (mobile = 0x955 'Lord Demortris')
+ **.**.**.**: (account = *****) (mobile = 0xAEE 'El')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Misc.HearAll.OnSpeech(SpeechEventArgs args)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
Can anybody pinpoint what went wrong so I can fix this error? Thank you much.
JoeyVille is offline   Reply With Quote
Old 04-03-2005, 08:36 PM   #2 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,784
Default

Looks like a problem related to your HearAll script. There might've been an incorrect character or something that would've been reported, or there's a problem with the script. Post that, and it can be worked through with you. Had some similar problems with a similar script, so hopefully it'll be all right.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline   Reply With Quote
Old 04-03-2005, 08:40 PM   #3 (permalink)
 
Join Date: Feb 2005
Age: 22
Posts: 115
Default

It seems there are bugs in RunUO itself that cause random crashes, even on scripts that are suppose to be legit =/.
GG521 is offline   Reply With Quote
Old 04-03-2005, 10:18 PM   #4 (permalink)
 
Join Date: Jul 2004
Age: 20
Posts: 76
Default

Quote:
Originally Posted by GG521
It seems there are bugs in RunUO itself that cause random crashes, even on scripts that are suppose to be legit =/.
I removed the HearAll script and have not had any crashes. After the first crash (and after posting this first topic) I started the shard again with the HearAll script, and it crashed minutes later. Apparently it was the HearAll script. Here it is:

Code:
using System;
using System.Collections;
using Server;
using Server.Mobiles;

namespace Server.Misc
{
	public class HearAll
	{
		private static bool m_ConsolePrint;
		private static ArrayList m_HearAll = new ArrayList();

		public static void Initialize()
		{
			Commands.Register( "HearAll", AccessLevel.Administrator, new CommandEventHandler( HearAll_OnCommand ) );
			Commands.Register( "ConsoleHearAll", AccessLevel.Administrator, new CommandEventHandler( ConsoleHearAll_OnCommand ) );

			EventSink.Speech += new SpeechEventHandler( OnSpeech );
		}

		private static void OnSpeech( SpeechEventArgs args )
		{
			string msg;
			if ( args.Mobile.Region.Name.Length > 0 )
				msg = String.Format( "{0} ({1}): {2}", args.Mobile.Name, args.Mobile.Region.Name, args.Speech );
			else
				msg = String.Format( "{0}: {1}", args.Mobile.Name, args.Speech );
			if ( m_ConsolePrint )
				Console.WriteLine( msg );

			ArrayList remove = null;
			for(int i=0;i<m_HearAll.Count;i++)
			{
				if ( ((Mobile)m_HearAll[i]).NetState == null )
				{
					if ( remove == null )
						remove = new ArrayList( 1 );
					remove.Add( m_HearAll[i] );
				}
				else
				{
					((Mobile)m_HearAll[i]).SendMessage( msg );
				}
			}

			if ( remove != null )
			{
				for(int i=0;i<remove.Count;i++)
					m_HearAll.Remove( remove[i] );
			}
		}

		private static void HearAll_OnCommand( CommandEventArgs args )
		{
			if ( m_HearAll.Contains( args.Mobile ) )
			{
				m_HearAll.Remove( args.Mobile );
				args.Mobile.SendMessage( "Hear all disabled." );
			}
			else
			{
				m_HearAll.Add( args.Mobile );
				args.Mobile.SendMessage( "Hear all enabled, type [hearall again to disable it." );
			}
		}

		private static void ConsoleHearAll_OnCommand( CommandEventArgs args )
		{
			m_ConsolePrint = !m_ConsolePrint;

			if ( m_ConsolePrint )
				args.Mobile.SendMessage( "Now sending all speech to the console." );
			else
				args.Mobile.SendMessage( "No longer sending speech to the console." );
		}
	}
}
Thanks for the help.
JoeyVille is offline   Reply With Quote
Old 04-03-2005, 10:28 PM   #5 (permalink)
Forum Novice
 
Join Date: Nov 2003
Location: New Zealand
Age: 21
Posts: 151
Send a message via ICQ to Bmzx007 Send a message via AIM to Bmzx007 Send a message via MSN to Bmzx007 Send a message via Yahoo to Bmzx007
Default

"System.NullReferenceException: Object reference not set to an instance of an object."

Typically this means that an Object you tried to reference no longer exists, or is null. My assumption is perhaps when referencing to the mobile, AFTER he/she has logged out, or been disconnected.

To attempt to fix this you may want to try adding some Null checks in, Or Try/Catch statements to avoid the crashes.
Bmzx007 is offline   Reply With Quote
Old 04-03-2005, 10:47 PM   #6 (permalink)
 
Join Date: Jul 2004
Age: 20
Posts: 76
Default

Quote:
Originally Posted by Bmzx007
"System.NullReferenceException: Object reference not set to an instance of an object."

Typically this means that an Object you tried to reference no longer exists, or is null. My assumption is perhaps when referencing to the mobile, AFTER he/she has logged out, or been disconnected.

To attempt to fix this you may want to try adding some Null checks in, Or Try/Catch statements to avoid the crashes.
It crashed again, even when HearAll was removed. This is the new crash report:

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Multis.BaseHouse.GetItems()
   at Server.Multis.HouseFoundation.Designer_Close(NetState state, IEntity e, EncodedReader pvSrc)
   at Server.Network.PacketHandlers.EncodedCommand(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
Thanks
JoeyVille 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