Vehicle mod: Server Crash

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

tunins

FNG / Fresh Meat
Apr 24, 2011
94
1
0
Chile
iwg.cl
Here:

Code:
ScriptLog: START MATCH
ScriptLog: Christopher logged in as .
ScriptLog: Christopher
NetComeGo: Close TcpipConnection 201.246.126.216:64288 03/01/12 13:25:09
ScriptLog: Christopher logged out.
Warning: KFPlayerController kf-mountainpass.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0010) Accessed None 'Player'
Warning: KFPlayerController kf-mountainpass.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0018) Accessed None
Critical: APlayerController::execPostFX_IsReady
Critical: (KFPlayerController kf-mountainpass.KFPlayerController @ Function KFMod.KFPlayerController.postfxoff : 0009)
Critical: UObject::ProcessEvent
Critical: (KFPlayerController kf-mountainpass.KFPlayerController, Function Engine.PlayerController.Destroyed)
Critical: ULevel::DestroyActor
Critical: (KFPlayerController kf-mountainpass.KFPlayerController)
Critical: UPlayer::Destroy
Critical: UNetConnection::Destroy
Critical: UObject::ConditionalDestroy
Critical: (TcpipConnection Package.TcpipConnection)
Critical: UNetDriver::TickDispatch
Critical: UTcpNetDriver::TickDispatch
Critical: UpdatePreNet
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: Level KF-MountainPass_Day
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Log: FileManager: Reading 0 GByte 528 MByte 976 KByte 502 Bytes from HD took 1.308996 seconds (1.077996 reading, 0.231000 seeking).
Log: FileManager: 0.326999 seconds spent with misc. duties
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 03/01/12 13:25:09
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Hi Tunins

This is a known issue with the mod and I will try my best to fix it asap.

Marco. do you have any ideas what could be causing this?
 

FluX

Grizzled Veteran
Oct 26, 2010
5,394
234
63
www.fluxiserver.co.uk
By the looks of it, it's something to do with the menu closing which causes an error "destroying" the player. Could one of your checks be looking at more then it should? WHat I mean is, when it does the check, there is part that isn't taken in and kills it off.
 

Marco

Active member
May 23, 2009
644
232
43
Finland
I have reason to believe this crash it triggered by KFHumanPawn.StopHitCamEffects (or DoHitCamEffects):
Code:
simulated function StopHitCamEffects()
{
	CurrentBlurIntensity=0.0;

	if( CameraEffectFound != none )
	{
		RemoveCameraEffect(CameraEffectFound);
	}

	if( KFPC != none )
	{
		KFPC.StopViewShaking();
		KFPC.SetBlur(0);
	}
}
Since they are written in a way that they assume they have network replication setup for remote call functions. However while player is controlling a vehicle they don't and so when player disconnects while in a vehicle that function is executed in server side, thus calling PostFx functions in server (which seams Tripwire didn't add any futher security checks to avoid crashes like this).

So either (or both) Tripwire should add security checks on PostFX (in C++ codes) functions to avoid crashes on specific conditions (pseudo code):
Code:
void APlayerController::execPostFX_IsReady( FFrame& Stack, RESULT_DECL )
{
	guard(APlayerController::execPostFX_IsReady);
	P_FINISH;

	[COLOR="Red"]if( !Cast<UViewport>(Player) )[/COLOR] // Prevent from crashing servers.
		[COLOR="Red"]return;[/COLOR]
	... rest of the function ...
	unguardexec;
}
or edit the UnrealScript functions to do nothing while executed in server:
Code:
simulated function StopHitCamEffects()
{
	CurrentBlurIntensity=0.0;

	if( CameraEffectFound != none )
	{
		RemoveCameraEffect(CameraEffectFound);
	}

	if( KFPC!=none && [COLOR="Red"]Viewport(KFPC.Player)!=None[/COLOR] )
	{
		KFPC.StopViewShaking();
		KFPC.SetBlur(0);
	}
}
 
Last edited:

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Hi Marco

Right I tried this by making a patch mutator which replaces the pawn and added your code.
The server still crashes when disconnecting whilst in the car.

Here is from the log file.. hope it can help

Code:
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
Warning: VehicleAvoidArea KF-TestMap.VehicleAvoidArea (Function ROEngine.VehicleAvoidArea.Touch:003E) Accessed None 'Controller'
NetComeGo: Close TcpipConnection 192.168.1.65:51877 03/03/12 22:37:21
Warning: KFPlayerController KF-TestMap.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0010) Accessed None 'Player'
Warning: KFPlayerController KF-TestMap.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0018) Accessed None
Critical: APlayerController::execPostFX_IsReady
Critical: (KFPlayerController KF-TestMap.KFPlayerController @ Function KFMod.KFPlayerController.postfxoff : 0009)
Critical: UObject::ProcessEvent
Critical: (KFPlayerController KF-TestMap.KFPlayerController, Function Engine.PlayerController.Destroyed)
Critical: ULevel::DestroyActor
Critical: (KFPlayerController KF-TestMap.KFPlayerController)
Critical: UPlayer::Destroy
Critical: UNetConnection::Destroy
Critical: UObject::ConditionalDestroy
Critical: (TcpipConnection Package.TcpipConnection)
Critical: UNetDriver::TickDispatch
Critical: UTcpNetDriver::TickDispatch
Critical: UpdatePreNet
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: Level Untitled
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Log: FileManager: Reading 0 GByte 430 MByte 581 KByte 96 Bytes from HD took 0.894993 seconds (0.798993 reading, 0.096000 seeking).
Log: FileManager: 0.348999 seconds spent with misc. duties
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 03/03/12 22:37:21
 

Marco

Active member
May 23, 2009
644
232
43
Finland
Hi Marco

Right I tried this by making a patch mutator which replaces the pawn and added your code.
The server still crashes when disconnecting whilst in the car.

Well there's still more, try with all these (in your custom KFHumanPawn class):
Code:
simulated function AddBlur(Float BlurDuration, float Intensity)
{
	if( KFPC!=none && Viewport(KFPC.Player)!=None )
		Super.AddBlur(BlurDuration,Intensity);
}
simulated function DoHitCamEffects(vector HitDirection, float JarrScale )
{
	if( KFPC!=none && Viewport(KFPC.Player)!=None )
		Super.DoHitCamEffects(HitDirection,JarrScale);
}
simulated function StopHitCamEffects()
{
	if( KFPC!=none && Viewport(KFPC.Player)!=None )
		Super.StopHitCamEffects();
}
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
crashed again

this is from the log

Code:
NetComeGo: Close TcpipConnection 192.168.1.65:63806 03/04/12 11:14:00
Warning: KFPlayerController KF-TestMap.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0010) Accessed None 'Player'
Warning: KFPlayerController KF-TestMap.KFPlayerController (Function Engine.PlayerController.ClientCloseMenu:0018) Accessed None
Critical: APlayerController::execPostFX_IsReady
Critical: (KFPlayerController KF-TestMap.KFPlayerController @ Function KFMod.KFPlayerController.postfxoff : 0009)
Critical: UObject::ProcessEvent
Critical: (KFPlayerController KF-TestMap.KFPlayerController, Function Engine.PlayerController.Destroyed)
Critical: ULevel::DestroyActor
Critical: (KFPlayerController KF-TestMap.KFPlayerController)
Critical: UPlayer::Destroy
Critical: UNetConnection::Destroy
Critical: UObject::ConditionalDestroy
Critical: (TcpipConnection Package.TcpipConnection)
Critical: UNetDriver::TickDispatch
Critical: UTcpNetDriver::TickDispatch
Critical: UpdatePreNet
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: Level Untitled
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Log: FileManager: Reading 0 GByte 430 MByte 1007 KByte 768 Bytes from HD took 0.967993 seconds (0.848993 reading, 0.119000 seeking).
Log: FileManager: 0.330000 seconds spent with misc. duties
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 03/04/12 11:14:01
 

Marco

Active member
May 23, 2009
644
232
43
Finland
Marco

is there anyway, of stopping players from accessing the menu or disconnecting while in the car?

Sounds like a horrible idea...
You could probably try adding a if( Viewport(Player)!=None ) check to some KFPlayerController functions (like function postfxoff) as-well to see if it helps.
 
  • Like
Reactions: braindead

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Sounds like a horrible idea...
You could probably try adding a if( Viewport(Player)!=None ) check to some KFPlayerController functions (like function postfxoff) as-well to see if it helps.

you amazing man you, it works!!! no more crash!!!

will try and get someone to run this on a public server to test it though, to check for anymore bugs, but thank you so much Marco!

would you be able to add this to your next version of serverperks? as people I know would like to be able to use both at the same time and being this fix requires a new controller, I doubt both will work together as is?
 

Marco

Active member
May 23, 2009
644
232
43
Finland
would you be able to add this to your next version of serverperks? as people I know would like to be able to use both at the same time and being this fix requires a new controller, I doubt both will work together as is?

Yes I will (as I got a trader menu bug to fix in it anyway).
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Yes I will (as I got a trader menu bug to fix in it anyway).

Awesome and thank you once again for your help on this. It has been such a shame that the mod is quite old now and no one hardly ever plays it on servers because of this silly issue.

lol I would never have found that in a million years.

p.s. this is my controller amendment

Code:
class VehicleController extends KFPlayerController;

simulated function postfxoff(int i)
{
	if( Viewport(Player)!=None )
	{
		if( PostFX_IsReady() )
			PostFX_SetActive(i, false);
	}
}

The fix file:

http://www.gamefront.com/files/21405666/BD_Vehicle_Mod_patch_1.1.rar
 
Last edited:

madfin

Member
Jun 30, 2014
95
0
6
Finland
I just recently found this mod and tried it on my server. Sadly it doesn't seem to function properly anymore.

I installed vehicle mod 1001 and patch. But no success there. Server and client crashes instantly when welder is being used on a car. Without the patch you can't weld cars, but then there is that other crash bug.

I tried it with fresh install KF server and then with serverperks and Scrn balance. All resulted same way.

I changed the gametype as was instructed: game=KF_Vehicles_BD.BDGameType

Is there some trick i missed?

These are the files i used: (Manual)

http://www.moddb.com/mods/killing-floor-vehicle-mod