Random Server Crashes..
- pooty
- Posts: 4496
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: Random Server Crashes..
So the one crash today, end of round, I typed 'teams' during the countdown and boom. Might be coincidence but right after I hit return music stopped and it crashed. I definitely think its releated to teams/people coming going during mid rounds.
-
- Posts: 140
- Joined: Sat Jun 04, 2022 12:28 am
Re: Random Server Crashes..
Just make it so people aren't allowed to quit. That'll also solve the problem with not having enough players.
Re: Random Server Crashes..
Crashes happen too sometimes when people join/leave between rounds. Is it maybe evenmatch that's getting tripped up by that?
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.”
― Mark Twain
― Mark Twain
- pooty
- Posts: 4496
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: Random Server Crashes..
So last night we crashed at end of round on AJY, and someone did leave. I found this snippet as the last line of the log
Warning: UTComp_ONSGameRules ONS-ArcticJunkYard-)o(-Randomizer-V24.UTComp_ONSGameRules (Function UTCo
It cut off like that, but I noticed in that class, Two functions that maybe a place to look.
Which might be CheckScores?
Warning: UTComp_ONSGameRules ONS-AratheiaC)o(mplex-V2.UTComp_ONSGameRules (Function UTCompOmni.UTComp_ONSGameRules.CheckScore:01C7) Accessed None 'C'
Which we've seen a bunch in the logs.
Also in conjuntion with
Warning: UAMGameRules ONS-AratheiaC)o(mplex-V2.UAMGameRules (Function UAdminModV095b.UAMGameRules.PreventDeath:002F) Accessed None 'Controller'
Function NavigationPoint
which changes the playerstarts, which might be related to this warning
Warning: SpawnActor failed because class Pawn is abstract
ScriptLog: Couldn't spawn player of type UTCompOmni.UTComp_xPawn at ONS-Dria-Randomizer-V21.PlayerStart37
Although I think we figured this wasn't a cause.
But back to CheckScores code
Only spot I can see where accessing C = None would be PC=PlayerController(C) (Player Controller being the player, but what if they leave? Note: this construct is used quite a bit in engine.gameinfo ( http://kos.informatik.uni-osnabrueck.de ... einfo.html )
So maybe we need two more checks:
Snarf, what do you think?
Warning: UTComp_ONSGameRules ONS-ArcticJunkYard-)o(-Randomizer-V24.UTComp_ONSGameRules (Function UTCo
It cut off like that, but I noticed in that class, Two functions that maybe a place to look.
Which might be CheckScores?
Warning: UTComp_ONSGameRules ONS-AratheiaC)o(mplex-V2.UTComp_ONSGameRules (Function UTCompOmni.UTComp_ONSGameRules.CheckScore:01C7) Accessed None 'C'
Which we've seen a bunch in the logs.
Also in conjuntion with
Warning: UAMGameRules ONS-AratheiaC)o(mplex-V2.UAMGameRules (Function UAdminModV095b.UAMGameRules.PreventDeath:002F) Accessed None 'Controller'
Function NavigationPoint
which changes the playerstarts, which might be related to this warning
Warning: SpawnActor failed because class Pawn is abstract
ScriptLog: Couldn't spawn player of type UTCompOmni.UTComp_xPawn at ONS-Dria-Randomizer-V21.PlayerStart37
Although I think we figured this wasn't a cause.
But back to CheckScores code
Code: Select all
// snarf attempt to fix the after round shenanigans
function bool CheckScore(PlayerReplicationInfo Scorer)
{
local PlayerController PC;
local Controller C;
local ONSOnslaughtGame ONS;
local int deadCore;
local bool retval;
retval = false;
if(NextGameRules != none)
retval = NextGameRules.CheckScore(Scorer);
deadCore = -1;
ONS = ONSOnslaughtGame(Level.Game);
if(ONS != none && ONS.PowerCores[ONS.FinalCore[0]].Health <= 0)
deadCore = 0;
else if(ONS != none && ONS.PowerCores[ONS.FinalCore[1]].Health <= 0)
deadCore = 1;
//round has ended
if(deadCore >= 0)
{
for (C = Level.ControllerList; C != None; C = C.NextController)
{
PC = PlayerController(C);
if (PC != None)
{
PC.ClientSetBehindView(true);
PC.ClientSetViewTarget(ONS.PowerCores[ONS.FinalCore[deadCore]]);
PC.SetViewTarget(ONS.PowerCores[ONS.FinalCore[deadCore]]);
PC.ClientRoundEnded();
}
if(C != None)
C.RoundHasEnded();
}
}
return retval;
}
So maybe we need two more checks:
Code: Select all
[b] for (C = Level.ControllerList; C != None; C = C.NextController)
{
if ( C != None) // this should be unecessary based on for loop but only spot where C could be accessed and be none.
PC = PlayerController(C);
if ((PC != None) && P.IsA('PlayerController')) // Saw that check in engine.gameinfo, is it possible for PC to be non Player and PC.ClientSet functions fail causing a crash?
{
PC.ClientSetBehindView(true);
PC.ClientSetViewTarget(ONS.PowerCores[ONS.FinalCore[deadCore]]);
PC.SetViewTarget(ONS.PowerCores[ONS.FinalCore[deadCore]]);
PC.ClientRoundEnded();
}
if(C != None)
C.RoundHasEnded();
}[/b]
- captainsnarf
- Posts: 2685
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: Random Server Crashes..
I think I need to change it to use a while loop instead of for loop.
If Level.ControllerList is None, then this for loop will cause a 'Accessed None' error when it tries to execute 'C = C.NextController'.
expression A is executed first. At the end of the loop, expression C is executed. Before entering the loop again, expression B is checked for true. If false the looping is over.
Level.ControllerList is a linked list. Generally you use a while loop for those.
The for loop was copy/paste from existing engine code, so I thought it would work.
this is unnecessary
It's safe to do
This will result in PC = None also, not 'Accessed None' error.
Code: Select all
for (C = Level.ControllerList; C != None; C = C.NextController)
{
}
Code: Select all
for(expression A;expression B; expression C) { ... }
Level.ControllerList is a linked list. Generally you use a while loop for those.
Code: Select all
local Controller C;
C = Level.ControllerList;
while(C != None)
{
...
C = C.NextController;
}
this is unnecessary
Code: Select all
if(C != None)
PC = PlayerController(C);
Code: Select all
PC = PlayerController(None);
As far as I understand this is all single threaded. This function will execute in its entirety before processing any players that leave. It should be a non-issue.Player Controller being the player, but what if they leave?
- pooty
- Posts: 4496
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: Random Server Crashes..
Should be.. but somewhere something is getting messed up.. I am fairly certain it has to do with timing of a player leaving usually right at the end of the round (before the countdown of 1...2...3).As far as I understand this is all single threaded. This function will execute in its entirety before processing any players that leave. It should be a non-issue.
- captainsnarf
- Posts: 2685
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: Random Server Crashes..
We were playing Valarna last night and a few players dropped. Enyo nope'd out between rounds and bam.. another crash. I posted a new version of UTCompOmni with that 'for' loop changed to a 'while' loop to avoid the possible None reference discussed above.
- pooty
- Posts: 4496
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: Random Server Crashes..
Yep saw that. I'll get the new version up. I think if it still crashes, maybe we start to focus on EvenMatch. (or UAdminMod but we don't have the source for that) - those two care about team sizes.
- captainsnarf
- Posts: 2685
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: Random Server Crashes..
Sadly, we are still having crashes. I checked the logs and this is the main error:
The warning 'Other object in slot' comes from the IsValid() function. That is called from the destructor for the the object (line 464 of UnObj.cpp).
This is still there also.
I don't think it's the problem though. It's definitely UTComp, but not this function.
Code: Select all
Warning: Other object in slot
Warning: Other is: NewNet_AssaultGrenade ONS-Valarna-Randomizer-V7.NewNet_AssaultRifle.NewNet_AssaultGrenade385
Warning: This is: TcpipConnection Package.TcpipConnection
Critical: Assertion failed: IsValid() [File:.\UnObj.cpp] [Line: 464]
Exit: Executing UObject::StaticShutdownAfterError
This is still there also.
Code: Select all
Warning: UTComp_ONSGameRules ONS-Valarna-Randomizer-V7.UTComp_ONSGameRules (Function UTCompOmni.UTComp_ONSGameRules.CheckScore:01D2) Accessed None 'C'
- pooty
- Posts: 4496
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: Random Server Crashes..
It seems about 1 a night, 1 every other night or so. I've also noticed besides it being an end of round thing, I always seem to get much more lag just before it happens... meaning there will be a round with a bunch of lag/slowness and shortly afterwards..boom. I wonder if its a memory leak somewhere?