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!

Help! NullReference

Hey guys. Our server is getting a null Reference and crashing while mining. Not 100% sure which file to look in to... Mining.cs, or Harvest, or what...

Code:
RunUO Version 2.1, Build 3935.18824
Operating System: Microsoft Windows NT 6.0.6002 Service Pack 2
.NET Framework: 2.0.50727.4241
Time: 2/5/2014 9:02:31 AM
Mobiles: 37169
Items: 181251
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.TextDefinition.SendMessageTo(Mobile m, TextDefinition def)
   at Server.Engines.Harvest.HarvestSystem.FinishHarvesting(Mobile from, Item tool, HarvestDefinition def, Object toHarvest, Object locked)
   at Server.Engines.Harvest.HarvestSoundTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

any advice would be great. Its a fresh install with SF Imbuing script added and a few minor custom scripts we wrote but testing for 2 weeks on another server before putting them on here. SF Is the only untested thing.
 
i found the cause, im just not sure why... it was working before. Its when ever a bonus resource we added is given out.

Code:
                                        new BonusHarvestResource( 0, 99.3, null, typeof( NullSphere ) ),

Code:
using System;
using Server;
 
namespace Server.Items
{
public class NullSphere : Item
{
public override double DefaultWeight
{
get { return 0.1; }
}
 
[Constructable]
public NullSphere() : this( 1 )
{
}
 
[Constructable]
public NullSphere( int amount ) : base( 0x1F1B )
{
                        Name = "Null Sphere";
Stackable = true;
Amount = amount;
                        Weight = 0.1;
}
 
public NullSphere( Serial serial ) : base( serial )
{
}
 
 
 
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
 
writer.Write( (int) 0 ); // version
}
 
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
 
int version = reader.ReadInt();
}
}
}
 
Top