Actarus
Member
Hi Guys i am here for request Help with my Important problem with a Player Login Crash.
Sometimes when player of my shard Login, the server Crashing with this CrashLog:
Server Crash Report
===================
RunUO Version 0.5, Build 5458.41239
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.296
Time: 27/12/2014 22:53:02
Mobiles: 55952
Items: 899163
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
in Server.Mobiles.PlayerMobile.OnLogin(LoginEventArgs e)
in Server.LoginEventHandler.Invoke(LoginEventArgs e)
in Server.Network.PacketHandlers.DoLogin(NetState state, Mobile m) in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Network\PacketHandlers.cs:riga 2433
in Server.Network.PacketHandlers.LoginTimer.OnTick() in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Network\PacketHandlers.cs:riga 2224
in Server.Timer.Slice() in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Timer.cs:riga 386
in Server.Core.Main(String[] args) in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Main.cs:riga 629
Clients:
- Count: 10
+ 93.41.226.195: (account = player1) (mobile = 0x18922 'Vash')
+ 93.41.226.195: (account = player2) (mobile = 0x1A015 'Peter Parker')
+ 93.36.49.110: (account = olaf37xx) (mobile = 0x15AC9 'Banshee')
+ 93.44.209.120: (account = pettero) (mobile = 0x1675D 'Galandor')
+ 79.9.127.24: (account = leonardo) (mobile = 0xCE3B 'Goffredo')
+ 93.44.209.120: (account = simolapeste) (mobile = 0xCCCD 'SimoLaPeste')
+ 79.52.113.40: (account = Deastroyer) (mobile = 0x16B06 'Abigor The Evil')
+ 93.41.226.195: (account = Tony) (mobile = 0x83D1 'Kage')
+ 46.227.0.166: (account = DrTroll) (mobile = 0x15ABE 'Ghoul')
+ 89.15.237.88: (account = andrea82) (mobile = 0x8058 'Phate')
In my shard i have added a Donation Coin System Reward that Give to Plare some Coins in base of Player Login Minute on Day.
OnLogin Fuction in PlayerMobile :
private static void OnLogin(LoginEventArgs e)
{
Mobile from = e.Mobile;
if (from == null)
return;
Account acc = from.Account as Account;
if (acc == null)
return;
if (acc.GetTag("Donation") == "Received")
{
if (acc.DCActiveMin >= 120)
Timer.DelayCall(TimeSpan.FromSeconds(10), ((PlayerMobile)@from).GiveDC);
}
if ( DateTime.Now > acc.PremiumTime )
acc.SetTag("Premium", "Inactive");
ecc...
GiveDC Function in PlayerMobile
public void GiveDC()
{
Account acc = this.Account as Account;
int c = 0;
if (this == null || acc == null)
return;
for (int i = 0; acc.DCActiveMin >= 120; ++i)
{
if (this.BankBox != null)
{
Item don = this.BankBox.FindItemByType(typeof(DonationCoinsToken));
if (don != null)
{
DonationCoinsToken dc = don as DonationCoinsToken;
dc.Worth += 1;
}
else
{
this.BankBox.DropItem( new DonationCoinsToken(1) );
}
}
else if (this.Backpack != null)
{
Item don = this.Backpack.FindItemByType(typeof(DonationCoinsToken));
if (don != null)
{
DonationCoinsToken dc = don as DonationCoinsToken;
dc.Worth += 1;
}
else
{
this.Backpack.DropItem( new DonationCoinsToken(1) );
}
}
acc.DCActiveMin -= 120;
c += 1;
}
this.SendMessage("You Receive a Donation Check of {0} Amount for Your Loyalty", c);
}
Can someone Help me iwth this Crash. Donaction Coins System dont give me Problem in thelast Days.
I add to Post the File listed on Crash Report
Sometimes when player of my shard Login, the server Crashing with this CrashLog:
Server Crash Report
===================
RunUO Version 0.5, Build 5458.41239
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.296
Time: 27/12/2014 22:53:02
Mobiles: 55952
Items: 899163
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
in Server.Mobiles.PlayerMobile.OnLogin(LoginEventArgs e)
in Server.LoginEventHandler.Invoke(LoginEventArgs e)
in Server.Network.PacketHandlers.DoLogin(NetState state, Mobile m) in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Network\PacketHandlers.cs:riga 2433
in Server.Network.PacketHandlers.LoginTimer.OnTick() in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Network\PacketHandlers.cs:riga 2224
in Server.Timer.Slice() in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Timer.cs:riga 386
in Server.Core.Main(String[] args) in c:\Users\Administrator\Desktop\Backup Totale UOTale\Server\Main.cs:riga 629
Clients:
- Count: 10
+ 93.41.226.195: (account = player1) (mobile = 0x18922 'Vash')
+ 93.41.226.195: (account = player2) (mobile = 0x1A015 'Peter Parker')
+ 93.36.49.110: (account = olaf37xx) (mobile = 0x15AC9 'Banshee')
+ 93.44.209.120: (account = pettero) (mobile = 0x1675D 'Galandor')
+ 79.9.127.24: (account = leonardo) (mobile = 0xCE3B 'Goffredo')
+ 93.44.209.120: (account = simolapeste) (mobile = 0xCCCD 'SimoLaPeste')
+ 79.52.113.40: (account = Deastroyer) (mobile = 0x16B06 'Abigor The Evil')
+ 93.41.226.195: (account = Tony) (mobile = 0x83D1 'Kage')
+ 46.227.0.166: (account = DrTroll) (mobile = 0x15ABE 'Ghoul')
+ 89.15.237.88: (account = andrea82) (mobile = 0x8058 'Phate')
In my shard i have added a Donation Coin System Reward that Give to Plare some Coins in base of Player Login Minute on Day.
OnLogin Fuction in PlayerMobile :
private static void OnLogin(LoginEventArgs e)
{
Mobile from = e.Mobile;
if (from == null)
return;
Account acc = from.Account as Account;
if (acc == null)
return;
if (acc.GetTag("Donation") == "Received")
{
if (acc.DCActiveMin >= 120)
Timer.DelayCall(TimeSpan.FromSeconds(10), ((PlayerMobile)@from).GiveDC);
}
if ( DateTime.Now > acc.PremiumTime )
acc.SetTag("Premium", "Inactive");
ecc...
GiveDC Function in PlayerMobile
public void GiveDC()
{
Account acc = this.Account as Account;
int c = 0;
if (this == null || acc == null)
return;
for (int i = 0; acc.DCActiveMin >= 120; ++i)
{
if (this.BankBox != null)
{
Item don = this.BankBox.FindItemByType(typeof(DonationCoinsToken));
if (don != null)
{
DonationCoinsToken dc = don as DonationCoinsToken;
dc.Worth += 1;
}
else
{
this.BankBox.DropItem( new DonationCoinsToken(1) );
}
}
else if (this.Backpack != null)
{
Item don = this.Backpack.FindItemByType(typeof(DonationCoinsToken));
if (don != null)
{
DonationCoinsToken dc = don as DonationCoinsToken;
dc.Worth += 1;
}
else
{
this.Backpack.DropItem( new DonationCoinsToken(1) );
}
}
acc.DCActiveMin -= 120;
c += 1;
}
this.SendMessage("You Receive a Donation Check of {0} Amount for Your Loyalty", c);
}
Can someone Help me iwth this Crash. Donaction Coins System dont give me Problem in thelast Days.
I add to Post the File listed on Crash Report