• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Cannot Confirm Mast Fall on Centurion First Rate Causes C++ Pure virtual function call

TommyM

Sovereign of Death
Storm Modder
So lately this message keeps poping up and shuts the game completely.
Anyone ever faced this aswell?
 
Please post the .log files from your main game folder here straight after that happened.
 
Here you go.
 

Attachments

  • compile.log
    66.4 KB · Views: 132
  • error.log
    3.7 KB · Views: 132
  • system.log
    4.3 KB · Views: 152
Thanks. I can't look at them right now, but I will soon.
If you haven't heard by Monday, please part a reminder.
 
Well usually this happense when I'm in battle against large fleets such as "VS Warships" or "VS Scratch patrols".
Also I took a look in the system.log myself and it seems there are some textures that won't load when the game starts such as:
  • Can't load texture resource\textures\.tx
  • Can't load texture resource\textures\INTERFACES\PERKS\64\.TGA.tx
  • Cube map texture resource\textures\AMMO\EN3.TGA.tx can't loading
 
Last edited:
We haven't been able to track down why those texture errors occur.
Doesn't seem to do any actual harm in the game though.
 
Hhmp...its a shame cause I can't seem to battle no bigger than a bunch of warships ships without getting this crash. Weird.

In compile.log I found that this line keeps repeating itself:

  • For character 0 fall Mast name mast2 has index 2
  • For character 0 fall Mast name mast0 has index 0
What does it mean?
 
Last edited:
Looks like some debug lines related to masts falling.
You'd have to look it up in the code; probably the SEA_AI folder.
 
Those mast fall lines don't necessarily need to mean anything is wrong.
They probably just mean that a mast fell. :shrug
 
Thing is, the game crashes EXACTLY when the mast index hits 0.

(aka "For character 0 fall Mast name mast0 has index 0")
Could it be a bug in the ship itself?
 
Centurion class 4th rated.
Thanks. I moved your post to the Bug Tracker and renamed it to more accurately describe the issue.
At least.... we think that is the issue. Won't know for sure until we get the chance to look into it.
Not sure when that might be.

In the meantime, if you have a particularly "crashy" savegame, be sure to post it here for testing purposes. :doff
 
This stuff suggests a character somewhere was not correctly initialized:
Code:
RUNTIME ERROR - file: Characters\Leveling.c; line: 362
missed attribute: skillimportancetotal
RUNTIME ERROR - file: Characters\Leveling.c; line: 362
no rAP data
RUNTIME ERROR - file: Characters\Leveling.c; line: 368
missed attribute: skill
If you start getting that, please immediately make a savegame and post it here. I hate those errors.

Since you're running the 2 April Beta 4 version, you may want to consider updating to the Beta 4.1 WIP here:
Mod Release - Build 14 Beta 4.1 WIP | PiratesAhoy!
There will be another update to that coming soon; hopefully some time on Sunday.

In compile.log I found that this line keeps repeating itself:

  • For character 0 fall Mast name mast2 has index 2
  • For character 0 fall Mast name mast0 has index 0
What does it mean?
Turns out that is actually generated in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Code:
void procMastFall()
{
   int chrIdx = GetEventData();
   string mastName = GetEventData();
   int bFirstFall = GetEventData();

   if(chrIdx<0) return;
   ref mchr = GetMainCharacter(); // KK
   Characters[chrIdx].fallen = 1; //screwface
   int mastNum = strcut(mastName,4,strlen(mastName)-1);
   trace("For character "+chrIdx+" fall Mast name "+mastName+" has index "+mastNum);
   if(!CheckAttribute(mchr, "Flags.waitdelay"))
   {
     mchr.Flags.waitdelay = 1000; //screwface : big value needed !!!!!
     FlagsDelay();
   }
   else
   {
     // A waitdelay is still running so we increase its time
     if(CheckAttribute(&BattleInterface, "Waitrefreshflags"))
       mchr.Flags.waitdelay = sti(BattleInterface.Waitrefreshflags) + 1000; // executed frames number + 1000 new frames
     else
       mchr.Flags.waitdelay = sti(mchr.Flags.waitdelay) + 1000;
   }
   SendMessage(&PeopleOnShip, "lal", MSG_PEOPLES_ON_SHIP_MASTFALL, GetCharacter(chrIdx), mastNum);
}

A lot of Different Flags code, which is admittedly not the most stable of features in the modpack.
You can try to replace it with:
Code:
void procMastFall()
{
   return; // PB: For testing, abort this function altogether
   int chrIdx = GetEventData();
   string mastName = GetEventData();
   int bFirstFall = GetEventData();

   if(chrIdx<0) return;
   ref mchr = GetMainCharacter(); // KK
   Characters[chrIdx].fallen = 1; //screwface
   int mastNum = strcut(mastName,4,strlen(mastName)-1);
   trace("For character "+chrIdx+" fall Mast name "+mastName+" has index "+mastNum);
   if(!CheckAttribute(mchr, "Flags.waitdelay"))
   {
     mchr.Flags.waitdelay = 1000; //screwface : big value needed !!!!!
     FlagsDelay();
   }
   else
   {
     // A waitdelay is still running so we increase its time
     if(CheckAttribute(&BattleInterface, "Waitrefreshflags"))
       mchr.Flags.waitdelay = sti(BattleInterface.Waitrefreshflags) + 1000; // executed frames number + 1000 new frames
     else
       mchr.Flags.waitdelay = sti(mchr.Flags.waitdelay) + 1000;
   }
   SendMessage(&PeopleOnShip, "lal", MSG_PEOPLES_ON_SHIP_MASTFALL, GetCharacter(chrIdx), mastNum);
}

If that does what I hope it does, that will prevent masts from falling at all and may as a consequence also prevent crashes if they are indeed related to that.
 
Exactly one month later, but no further details have been posted. Time to archive this.
 
Back
Top