[CSM] Faulty Objective Mode crashes server

Ask questions, discuss ideas, get answers

Faulty Objective Mode crashes server

Postby Classical Modder » Sun Dec 09, 2018 7:49 pm

Hi all,

I have been dealing with an annoying issue for a while now. I have made two custom game modes which run on the Objective game play mode from XPack2. These game modes run on mods which themselves depend on the main "raised_fist" mod to run. The first custom game mode is called "Infiltration". Basically one side has to retrieve a briefcase from a secure location protected by the Axis team, and bring it to the extraction point to score a point. The game mode works just fine, on a local game and on Internet. The game mode works on the map "rf_arabian_nights".

Then there is the faulty game mode, Prisoner Rescue. Basically what I have done in this game mode, which again runs on a modified version of Objective, is to replace normal objectives with soldiers (hostages), in this case, dummy soldiers called "BritishSoldier". There are 16 hostages that have to be "rescued" from execution from the Axis team. The Allied team accomplishes this by killing all of the Axis players before they kill off all the hostages. This game mode has caused me some issues online, although it works fine on a local game and doesn't crash. We were even able to play it online on a dedicated server, but hosting a server with the map via BFSM crashes the map everytime. The game mode works on a map called "rf_hellhouse".

The modified game mode runs from a mod which is dependent on the main "raised_fist" mod. That mod is called "rf_extended", and it's also how I set up the other Objective game mode (Infiltration).

I'm thinking some faulty v_arg1 statements are causing the crash here, although in both maps, the v_arg1 statements are setup identically in the ObjectiveMode.con files.

What else could be causing the crash? I'm thinking that perhaps the server can't handle more than a certain number of spawned objectives (my Prisoner Rescue mode has 16 objectives spawning as soldiers in the rf_hellhouse map). I'll be posting the code from the relevant files here shortly, if that can help anyone.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 445
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Faulty Objective Mode crashes server

Postby russ » Mon Dec 10, 2018 1:05 am

A backtrace could probably provide a good hint.
russ
 
Posts: 61
Joined: Sun Oct 29, 2017 8:12 am

Re: Faulty Objective Mode crashes server

Postby Classical Modder » Thu Dec 13, 2018 7:12 am

I figured out what the problem was, but I have no idea why it happens.

The problem I think is tied to BFSM and the way it handles spawned objectives. More specifically, creating an Internet server with the Objective mode enabled for the rf_hellhouse map crashes the server, but it works fine locally. The reason is that the spawned objectives that I use are not actual PCO, but soldiers, which are not PCOs of course. I guess the Objective game mode, with BFSM, does not recognize other objective types outside PCOs. I have absolutely no idea why BFSM behaves like this atm.

This is very strange, because the same game mode has been successfully tested on a Dedicated Internet server, and no crashes occurred there. What could possibly cause BFSM to reject the different objective types? I have double checked the code but everything seems to be in order, other than the fact that my objectives are not PCOs, but soldiers. Double checking my BFSM settings to make sure I didn't miss anything, but I think everything is in order.

Posting the relevant code here:

Code: Select all
rem -----------------------------------------
rem ---  Felixstowe_RadarTower_Spawner  ---
rem -----------------------------------------
ObjectTemplate.create ObjectSpawner PrisonerSpawner
ObjectTemplate.setObjectTemplate 1 BritishSoldier
ObjectTemplate.setObjectTemplate 2 BritishSoldier
ObjectTemplate.SpawnDelay 9999
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200


This code crashes an Internet game using BFSM v2.01 (rf_hellhouse GPM_Objective) but works fine with the BF1942 Dedicated Internet server. As you can see, I am using soldiers as Objectives and not PCOs, and that is what causes the crash on BFSM v2.01.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 445
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Faulty Objective Mode crashes server

Postby russ » Fri Dec 14, 2018 9:15 pm

Seriously, enable core dumps and get a core dump. Use gdb and get a backtrace. It'll probably make it really obvious.
russ
 
Posts: 61
Joined: Sun Oct 29, 2017 8:12 am

Re: Faulty Objective Mode crashes server

Postby Classical Modder » Fri Dec 14, 2018 10:52 pm

russ wrote:Seriously, enable core dumps and get a core dump. Use gdb and get a backtrace. It'll probably make it really obvious.


Not sure how to do this, I don't manage my server myself a game hosting company does this for me.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 445
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Faulty Objective Mode crashes server

Postby russ » Sat Dec 15, 2018 12:31 am

I'd follow a distro specific document for enabling core dumps. If you're not comfortable enabling core dumps and the server isn't crashing right away, you can attach gdb to the running bf1942_lnxded process and then continue execution. Keep in mind that the server completely stops and restarts any time a new map is loaded.
russ
 
Posts: 61
Joined: Sun Oct 29, 2017 8:12 am


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: No registered users and 44 guests

cron