1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Post Feb 1st 2013 - bugs - Single Player

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Jan 28, 2013.

Thread Status:
Not open for further replies.
  1. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,239
    Location:
    Hamilton, NJ
  2. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
  3. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Sadly, if you force the workers in this save to recalculate from the save position hey don; start on the same builds, so the decision point (when they started that build) is lost, and not debuggable from this save.

    What I need is save from a turn where an AI worker STARTS on such a build when you press end turn. Meanwhile I have added an AI log of the form:

    City <NAME>, tile (<X>,<Y>) best build changed from <OLD BEST BUILD NAME> to <NEW BEST BUILD NAME>

    in an effort to help track this down, or at least to see how prevalent it is. If you (or anyone) has AI logging on, occasionally scanning it for these messages (with the latest SVN once I push the change to add this log later today) we'll at least get an idea of how much changing of the AI's view of the best build is and hopefully a pattern will emerge that will help track this down.
     
  4. sp00n

    sp00n Prince

    Joined:
    Jan 4, 2007
    Messages:
    347
    The "No Storms" checkbox in the C2C options doesn't seem to be working correctly. I'm still losing ships to storms.
     
  5. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,239
    Location:
    Hamilton, NJ
    SVN updated just yesterday.
     
  6. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    I noticed the same thing but profiling showed that nothing had actually changed. :confused: Koshling did though yesterday fix a bug with AI unit values which saved about 10% of a turn.
     
  7. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,549
    Gender:
    Male
    Location:
    Canberra, Australia
    There is a python method that asks if the building is free to the player. the actual test I am using is
    Code:
    if (not pPlayer.isBuildingFree(iType) and gc.getBuildingInfo(iType).getProductionCost() != -1):
    	[B]buildingList[i] = (gc.getBuildingInfo(iType).getDescription(), iType)[/B]
    	i += 1
    
    It is falling over on the line highlighted and has only started doing so since the barter post became auto build. Edit I have now set up some trace prints so I may be able to find out exactly what is happening.

    The No Storms option means that storms do not appear on the map, grow and spread and cause damage to ships. It has nothing to do the the storm event. It would be possible to remove that event if the option is on tough.
     
  8. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    I'm about to profile this save to see if anything leaps out...

    Edit - do you happen to have a save from 20 turns or so ago when it was playing faster? It would be useful to determine if the slow down is due to an SVN update, or just to a change in your game (e.g. - AIs starting to make contact with one another, exchanging those contacts, and diplomacy time going up a lot as a result)

    Edit 2 - nothing particularly stands out in the profile of the turn you posted. Time to do the auto-save is about 12 seconds, so setting your auto-save to be less frequent might help, assuming you currently have it set to every turn. Apart from that there are a few things that can are probably worth optimizing, but I don't see any particular hot-spot that would explain a sudden jump. If you have the earlier save for comparison that might help pin-point it. You could also try using a DLL from whatever earlier revision you were using before to see iof that makes THIS save go faster (again to help determine if the issue is a change in the game, or an SVN change)
     
  9. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,239
    Location:
    Hamilton, NJ
    Here's from where I started last night (Not sure how long ago it was). What I can note is I got 2 messages about civs spawning close to me from barbs.

    https://dl.dropbox.com/u/25874166/AutoSave_BC-7329.CivBeyondSwordSave

    Also I do not have auto every turn because it was causing desync's in multiplayer a few days ago in my v28 game with a friend.

    Edit: Just in case you need it here's a save about half was in between the two
    https://dl.dropbox.com/u/25874166/AutoSave_BC-7161.CivBeyondSwordSave

    Edit 2: If it helps I figured out I was on SVN 4787 before and the revision that removed the brick mason's obsolete tech last night.
     
  10. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    So overnight I was testing some progression stuff with AI autoplay, and found this really wierd bug. It may be related to Koshling's changes yesterday to Max Compat saving.

    Basically, the game had a MAF because it tried to save a game bigger than 10,000 KB (at least that is what I'm assuming, the file was 9999 KB). However, when I loaded that game and saved it manually it was about 4000 KB, which is far more reasonable for a game in the late Classical era. Anyways, I've attached both saves (they load the exact same, but one is way bigger). They compress to the same size though oddly.
     
  11. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Manual and auto save you the exact same code, so I don't think it can be that
     
  12. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    Well, those files are identical except one was auto-saved by Beyond the Sword and one was saved by me hitting Ctrl-S. They both load to AD 0045 in the same game.
     
  13. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    I'm not measuring any significant difference between the turn times of the earliest and latest save (about 2 seconds) - does it still run faster for you if you reload the older autosave and play a turn? If it doesn't that would imply it must be due to SVN changes - do you know what revision you last saw running faster?

    Edit - I then backed off to a version of the DLL from before all the recent changes (rev 4756) and tried it there. That took about 10% LONGER then the current version does, which is what I would expect, since there have been a number of optimizations since then.

    Net result is that I can neither reproduce nor explain any increase in times you have seen.
     
  14. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    This issue is repeatable. I autoplayed 100 turns from this and it started getting much bigger again in the autosaves.
     
  15. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,239
    Location:
    Hamilton, NJ
    I did another update and it seems to be running faster again. Maybe it was the fact that I had the game open for hours before actually playing (RAM running low or something of that nature). Well thanks for the help anyway. Your work with the AI has made them legitimately scary to fight against.
     
  16. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    I've looked through the load sequence of your 10M save, and there is nothing odd about the dictionary entries (if it was related to that change I would expect lots and lots of spurious repeated dictionary entries being the extra space). In fact, having spent several hours looking into it, I can find nothing odd about it at all, so my only theory is that (for some reason) the game engine is not compressing the stream. However, I'm pretty sure it has nothing to do with the dictionary change I made, so it remains mysterious.

    If you can find reproducible recipe then let me know (i.e. - one that can be deterministically run in 10-15 minutes, not one that requires an afternoon of autoplay for each test run)
     
  17. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    Based on my analysis of that save it is getting very slightly too big every turn, but not enough to be noticable until you've had it on all night. But yeah, the only way I've reproduced that dramatically it is to have it save a lot over a long period of time.
     
  18. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Does its size (the autoplay) 'reset' to normal on each session? i.e. - is it something that is just caused by long sessions maybe? (which would probably not be new)
     
  19. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,073
    Location:
    America
    I'm not quite certain what you are asking. If you mean does it save normally if it is loaded and then re-saved then yes. But if I go in at the end of a session and save manually it is also the normal size, so session length can't be the only factor involved.
     
  20. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,686
    Gender:
    Male
    Location:
    MN
    Had this error message show up and i added the NEW schema to it??? (Sub Combat Types???)
     
Thread Status:
Not open for further replies.

Share This Page