|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Jul 2004
Age: 20
Posts: 76
|
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) |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Mar 2003
Location: where I belong
Posts: 1,784
|
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 |
|
|
|
|
|
#4 (permalink) | |
|
Join Date: Jul 2004
Age: 20
Posts: 76
|
Quote:
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." );
}
}
}
|
|
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
|
"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. |
|
|
|
|
|
#6 (permalink) | |
|
Join Date: Jul 2004
Age: 20
Posts: 76
|
Quote:
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) |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|