• 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!

Fixed WorldMap Related Error.log Entry

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
I finally got around to installing the latest WIP and all went well until I entered the world map.

There it was: the screen freezes and the hard drive rattles for a second, then the ship moves and the rattling stops for a second. Repeat until finally leaving the world map.
Then I saw this error.log.
 

Attachments

  • error.log
    8.2 KB · Views: 162
I finally got around to installing the latest WIP and all went well until I entered the world map.

There it was: the screen freezes and the hard drive rattles for a second, then the ship moves and the rattling stops for a second. Repeat until finally leaving the world map.
Then I saw this error.log.
from where or what did you enter the worldmap?
 
I was sailing frome Grenada to Martinique and made it just past that little island by Barbados when the winds turned ugly and went into the world map there. I had started a new game at Grenada and this was my first sailing trip.
 
Do you have a savegame from before it happened?
Did it happen afterwards again?
 
Here is a save by that island. I have not gone anywhere else, so do not know if it will happen again. It is not remotely normal.
 

Attachments

  • -=Player=- Open Sea May 22nd, 1505.7z
    448.8 KB · Views: 124
Does this happen always at midnight or does it happen ALL the time?

Can you replicate it? Do you have a save on which it can be replicated?

worldmap_events.c errors tend to be very elusive. At least until now. :facepalm
 
I just sailed from Martinique to Barbados and when I went to the world map it behaved normally. :shrug
 
If there is no clear reason for the error, maybe we can just put some CheckAttributes in place.
I think the reason for the actual stuttering is because the game was logging the errors.
 
This is where the first error occurs:
Code:
void wdmEvent_EncounterCreate()
{
   float dltTime = GetEventData();
   float playerShipX = GetEventData();
   float playerShipZ = GetEventData();
   float playerShipAY = GetEventData();
   //Save player ship position
   worldMap.playerShipX = playerShipX;
   worldMap.playerShipZ = playerShipZ;
   worldMap.playerShipAY = playerShipAY;
   if(wdmCurrentIsland !=   WDM_NONE_ISLAND)
   {
     wdmLoginToSea.island = worldMap.islands.(wdmCurrentIsland).name; <----------- HERE ----------
     float ix = MakeFloat(worldMap.islands.(wdmCurrentIsland).position.rx);
     float iz = MakeFloat(worldMap.islands.(wdmCurrentIsland).position.rz);
     worldMap.playerShipDispX = (playerShipX - ix);
     worldMap.playerShipDispZ = (playerShipZ - iz);
   }else{

Using this code instead may help and give us more information too if it happens:
Code:
void wdmEvent_EncounterCreate()
{
   float dltTime = GetEventData();
   float playerShipX = GetEventData();
   float playerShipZ = GetEventData();
   float playerShipAY = GetEventData();
   //Save player ship position
   worldMap.playerShipX = playerShipX;
   worldMap.playerShipZ = playerShipZ;
   worldMap.playerShipAY = playerShipAY;
   if(wdmCurrentIsland !=   WDM_NONE_ISLAND)
   {
     // PB: Error handling -->
     if (!CheckAttribute(worldMap, "islands."+wdmCurrentIsland+".name"))
     {
       TraceAndLog("ERROR in wdmEvent_EncounterCreate: "+ wdmCurrentIsland + " does not have 'name' attribute. Please post your compile.log file at piratesahoy.net!");
       DumpAttributes(worldMap);
       return;
     }
     // PB: Error handling <--
     else
     {
       wdmLoginToSea.island = worldMap.islands.(wdmCurrentIsland).name;
       float ix = MakeFloat(worldMap.islands.(wdmCurrentIsland).position.rx);
       float iz = MakeFloat(worldMap.islands.(wdmCurrentIsland).position.rz);
       worldMap.playerShipDispX = (playerShipX - ix);
       worldMap.playerShipDispZ = (playerShipZ - iz);
     }

I didn't test this yet.
 
I can barely read that, but is it asking for an island name? Does that little island between Grenada and Barbados have a name?
 
I can barely read that, but is it asking for an island name? Does that little island between Grenada and Barbados have a name?
Both "IslaMona" and "Battle_Rocks" indeed do, which is why I'd like to know what 'wdmCurrentIsland' was at that time.

Anyway, extract attached to PROGRAM\WorldMap and see what happens. :shrug
 

Attachments

  • worldmap_events.zip
    2 KB · Views: 122
What was the message in the screen? I can't check the log file right now.
But thanks for posting.
 
Probably "ERROR in wdmEvent_EncounterCreate: does not have 'name' attribute. Please post your compile.log file at piratesahoy.net!". That's what is in "compile.log", anyway, followed by some diagnostic information and a whole mass of data about islands.
 
Probably "ERROR in wdmEvent_EncounterCreate: does not have 'name' attribute. Please post your compile.log file at piratesahoy.net!". That's what is in "compile.log", anyway, followed by some diagnostic information and a whole mass of data about islands.
that is right
but after landing on nevis and going back on sea map no more warnings
nothing bad was happen no freeze no ctd no lag nothing
 
I've seen that message when switching to the world map. But it was in the debugging mode with a lot of extra tracing enabled. Whatever that error is, it doesn't seem to be doing any immediately observable harm.
 
Here is the context in wdmEvent_EncounterCreate:
Code:
if(wdmCurrentIsland !=    WDM_NONE_ISLAND)
    {
        // PB: Error handling -->
        if (!CheckAttribute(worldMap, "islands."+wdmCurrentIsland+".name"))
        {
            TraceAndLog("ERROR in wdmEvent_EncounterCreate: "+ wdmCurrentIsland + " does not have 'name' attribute. Please post your compile.log file at piratesahoy.net!");
            DumpAttributes(worldMap);
            return;
        }
        // PB: Error handling <--
Looks like some encounter event got cancelled because wdmCurrentIsland is an empty string. I've seen guards in the code that are supposed to prevent that from happening...
 
Probably "ERROR in wdmEvent_EncounterCreate: does not have 'name' attribute. Please post your compile.log file at piratesahoy.net!". That's what is in "compile.log", anyway, followed by some diagnostic information and a whole mass of data about islands.
Please post that full compile.log file. It is for this bug: Unconfirmed Bug - stuttering in the world map | PiratesAhoy!
I recently added that code marked "PB" in there to get some more information on the error.log entries we used to get there.
The actual wording of the log message plus the "diagnostic information" is what I'm hoping to see.
But whenever I try to replicate it, I don't actually get it, so I don't know what happens there. :facepalm
 
Please post that full compile.log file.
I think, @Grey Roger was commenting on the log posted by @nonusnomeni in #49. There are some WorldMap dumps in that one.
And I still have saves I've used in that debugging session, so I can try to reproduce the error and get more logs, if there is need for them.

Edit: Yes, no problems reproducing that. I've attached the log in the other thread.
 
Last edited:
Back
Top