DolServer Crashing

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

DolServer Crashing

Postby Crazys » Fri Sep 05, 2014 4:17 am

Process is terminated due to StackOverflowException.
is the last line in the console
Server crashes and closes out "stopped working"

Both me and another person take a level 1 character into MagMell and start to run towards the water the server crashes with that error.
If we are on a Plvl 3 account no crash occurs. It only occurs with a normal account going through the area... Either of us going solo on a normal account or period causes it to crash.

No notice of other locations causing the issue... yet?

Very basic PvP server type with almost no extra scripts added in... I'm really confused....


*update...
So on a random chance I removed the pack horses sitting outside of the town to the south.... and haven't been able to recreate the crash... Headache +1 sorry for spamming the forums today it seems...
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: DolServer Crashing

Postby Leodagan » Fri Sep 05, 2014 6:17 am

Could you provide :

The SVN Revision you're using ?
The full "StackTrace" of the Exception (the log around the error message) ?
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: DolServer Crashing

Postby Crazys » Fri Sep 05, 2014 11:32 am

Could you provide :

The SVN Revision you're using ?
The full "StackTrace" of the Exception (the log around the error message) ?
SVN Rev - 3353

The Error line i listed is the last thing that shows up in the dol console. No other errors show up in the logs the entire window just crashes out. You can only see that line as the last thing in a greyed out window...
And after removing a few npcs it stopped happening...

I tried the same area on Storm without crashing the server and tried to match up and remove npcs I didn't see the same and it cleared the issue... really not sure
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: DolServer Crashing

Postby Leodagan » Fri Sep 05, 2014 11:35 am

Don't you have a screen shot or a method to reproduce ?

StackOverflowException are issues that needs to be fixed if this is really in Core !
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: DolServer Crashing

Postby dargon » Fri Sep 05, 2014 11:40 am

Sounds like the issue i origionally had on Forsaken when it was PvP, Had something to do with Keeps, or at least, i removed anything that involved keeps in the serverrules, and the error went away. I believe the PvP Ruleset needs a good overhaul at some point.. If i have some time, ill try to add it to my ToDo list
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: DolServer Crashing

Postby Crazys » Fri Sep 05, 2014 12:49 pm

Sounds like the issue i origionally had on Forsaken when it was PvP, Had something to do with Keeps, or at least, i removed anything that involved keeps in the serverrules, and the error went away. I believe the PvP Ruleset needs a good overhaul at some point.. If i have some time, ill try to add it to my ToDo list
THANK YOU!!!!! This tip lead me in the right direction.
ISSUE FOUND! I spawned a keep guard and walked near it and crashed again on a normal account. The Plvled accounts where immune and preventing the attack!! Now it makes sense why only Plvl 1 would crash in the area.

Inside PvP Server Rules
public override bool IsAllowedToAttack(GameLiving attacker, GameLiving defender, bool quiet)
Original
Code: Select all
#region Keep Guards //guard vs guard / npc if (attacker is GameKeepGuard) { if (defender is GameKeepGuard) return false; if (defender is GameNPC && (defender as GameNPC).Brain is IControlledBrain == false) return false; } //player vs guard if (defender is GameKeepGuard && attacker is GamePlayer && GameServer.KeepManager.IsEnemy(defender as GameKeepGuard, attacker as GamePlayer) == false) { if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!"); return false; } //guard vs player if (attacker is GameKeepGuard && defender is GamePlayer && GameServer.KeepManager.IsEnemy(attacker as GameKeepGuard, defender as GamePlayer) == false) { return false; } #endregion

Changed to
Code: Select all
#region Keep Guards //guard vs guard / npc if (attacker is GameKeepGuard) { if (defender is GameKeepGuard) return false; if (defender is GameNPC && (defender as GameNPC).Brain is IControlledBrain == false) return false; } //Doesn't attack when not owned if (attacker is GameKeepGuard && attacker.GuildName == "") { return false; } //player vs guard if (defender is GameKeepGuard && attacker is GamePlayer && attacker.GuildName == defender.GuildName) { if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!"); return false; } if (defender is GameKeepGuard && attacker is GamePlayer && defender.GuildName == "") { if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!"); return false; } //guard vs player if (defender is GameKeepGuard && attacker is GamePlayer && attacker.GuildName == defender.GuildName) { return false; } #endregion
In the original GameServer.KeepManager.IsEnemy calls link back to the iKeepHandler but have no return results which crashes out the guards attempt to engage the player.
In the RvR Rules it just checks realm and proceeds there is no need to handle keep guards directly.
However on PvP the guild should be checked.
I switched it to - No Owner = No Guild = Friendly
Has Owner = Has Guild. Matching Guild = Friendly
Others should fall through aka has guild doesn't match and be attack-able.

Compiled and ran some tested. No more server crash experienced.
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: DolServer Crashing

Postby Leodagan » Fri Sep 05, 2014 3:02 pm

Indeed if IKeepManager.IsEnemy() calls IServerRules.isAllowedToAttack() you'll have a recursive infinite loop.

This will fill the "Stack" pretty fast and this is bad for any software :)

It explains the "StackOverflowException"
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: DolServer Crashing

Postby dargon » Sat Sep 06, 2014 7:15 pm

Glad i could help, and Glad you found a better solution than just removing keepguard handlers completely, will help me out if i get to rewriting pvp serverrules, still need to look up the pvp rules from Mordred when i can and try to make some fixes.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: DolServer Crashing

Postby Crazys » Sat Sep 06, 2014 8:50 pm

Glad i could help, and Glad you found a better solution than just removing keepguard handlers completely, will help me out if i get to rewriting pvp serverrules, still need to look up the pvp rules from Mordred when i can and try to make some fixes.

;) My fix is how they worked on Mordred. Non Claimed Keeps did nothing but be there untill it was claimed. And Claimed keeps fought anyone who wasn't in that guild
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: DolServer Crashing

Postby Leodagan » Sun Sep 07, 2014 8:42 am

Shouldn't PVP Rules handle Alliance of Players to check for isEnemy ?
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: DolServer Crashing

Postby dargon » Sun Sep 07, 2014 11:23 pm

And groups as well, or so i would think, which is why im going to literally read the entire ruleset ><
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: DolServer Crashing

Postby Crazys » Mon Sep 08, 2014 12:21 am

And groups as well, or so i would think, which is why im going to literally read the entire ruleset ><
It may be the case with Alliances however I personally can save I've never been in an alliance on mordred...

2ndly
Groups where not exempt when the server was up since keeps would hold relics and could easily be abused to by pass keep defenses if someone in the guild was to go rogue.
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: DolServer Crashing

Postby Crazys » Mon Sep 08, 2014 2:31 pm

Shouldn't PVP Rules handle Alliance of Players to check for isEnemy ?
The question i'm wondering is. Do you feel that the change above is at-least stable and good enough to replace the old crashing code. Then if we feel we need to handle other things like alliances we can move forward to adding it at that time?
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm


Return to “%s” Support

Who is online

Users browsing this forum: Bing [Bot] and 1 guest