1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

Single Player bugs and crashes v39 plus (SVN) - After the 20th of July 2019

Discussion in 'Bugs and Crashes' started by Thunderbrd, Jul 21, 2019.

  1. billw2015

    billw2015 King

    Joined:
    Jun 22, 2015
    Messages:
    837
    I fixed it so it won't crash, but it doesn't answer why I have never seen it before now. That might be indicative of another problem.
     
  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,839
    Location:
    Norway
    Nah, iCivType will most often be -1 in the early game where there's still unused player slots to pick from.
    A bit later in the game when all player slots have been alive in the game at least once, then that code will start to recycle dead players, reincarnating them so to speak, and then iCivType will be > -1 and the error happens.

    Another thin is that the code won't run at all if there's 25 or more players currently alive, so at that point a player needs to die off before e.g. slot 27 is filled, then another needs to die before player slot 28 gets filled etc. So it is quite rare to reach the point where all player slots have been alive player in the game at some point. There also needs to be enough barbarian cities around for the code ro create new players... etc. A lot of factors making that bug rare.
     
    Last edited: Sep 8, 2019
    billw2015 likes this.
  3. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,513
    Gender:
    Male
    Location:
    Western IL. cornfields
    <Define>
    <DefineName>MAX_WORLD_WONDERS_PER_CITY</DefineName>
    <iDefineIntVal>14</iDefineIntVal>
    </Define>
     
  4. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,556
    Gender:
    Male
    Location:
    Canberra, Australia
    Which is turned off/ignored if you use the Unlimited Wonders option.
     
  5. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,513
    Gender:
    Male
    Location:
    Western IL. cornfields
    Last I saw, if you Do Not have Unlimited Wonders On, you get 4 per city. Has this changed?
     
  6. LumenAngel

    LumenAngel King

    Joined:
    Apr 15, 2012
    Messages:
    670
    Location:
    Center of the World (France)
    Exactly what happend this morning... Was searching for a resssource on the map -> crash when scrolling.
    Even with graphism on low
     
  7. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    9,238
    Location:
    Poland
    This depends on culture level - look at bottom of each culture level entry in culture level infos xml (its in gameinfo folder).
    4 National Wonders is for Poor culture, and 4 World Wonder limit is for Refined culture.
    You can see those values ingame even if you play with unlimited wonders on.
     
  8. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    9,238
    Location:
    Poland
    @Toffer90 is it possible to hide this wonder limit display, if playing with unlimited wonders on?
    Civ4BeyondSword 2019-09-09 09-18-35-41.png Civ4BeyondSword 2019-09-09 09-18-43-70.png
    Or at least numbers, that denote current limit could be hidden.
     
    Last edited: Sep 9, 2019
  9. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,513
    Gender:
    Male
    Location:
    Western IL. cornfields
    You have pushed the limits and now the piper has come asking for his pay. ;) Your game will most likely Not recover.
     
  10. billw2015

    billw2015 King

    Joined:
    Jun 22, 2015
    Messages:
    837
    Don't be premature, I didn't really start to look at it yet. I have so far determined that only 500MB or so of usage is allocated through the DLL (250MB of it is just arrays of ints!), such that even if we can shave off ALL allocation from the mod itself it would not be satisfactory. Instead I think we need to concentrate on improving the behaviour of the paging. Currently it appears to not be aggressive enough in freeing memory (it doesn't seem to do it at all in fact). The first thing I'm going to look at is this, I am also going to add warnings about low memory, and force the paging to free memory when it is low if such a thing is possible (I didn't look at the paging code at all yet).
     
  11. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    9,238
    Location:
    Poland
    @Toffer90 I got this python error, when I loaded one of saves.
    Code:
    Traceback (most recent call last):
    
      File "CvWBInterface", line 230, in writeDesc
    
      File "CvWBDesc", line 1545, in write
    
      File "CvWBDesc", line 1193, in write
    
      File "CvWBDesc", line 809, in write
    
    UnicodeEncodeError: 'latin-1' codec can't encode character u'\u01eb' in position 17: ordinal not in range(256)
    ERR: Python function writeDesc failed, module CvWBInterface
    
     
  12. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,513
    Gender:
    Male
    Location:
    Western IL. cornfields
    Your Magic notwithstanding, And based on history of the past performances of this Mod, his game is basically over.

    We ALL await you Magic act here in this regard. If you can make the game start using the paging file memory, then the cap that has haunted us for 10+ years will be lifted off and will finally set us Free! I sincerely Hope you have success here! :please:
     
  13. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,839
    Location:
    Norway
    K, I know what's wrong and how to fix it. May have time for it today.
     
    raxo2222 likes this.
  14. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    When playing on big maps the Viewports feature should be enabled to reduce the memory usage.

    The paging can't do more then it already does because it simply hides plots from the exe. But once the exe saw a plot because of moving around on the map it loads the full graphics for that plot into it's memory. There's no way to tell the exe to clear it's memory from no longer needed textures or models and such things.
     
    raxo2222 and billw2015 like this.
  15. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    About saving memory.
    There are some broken unused Features in C2C like the
    GAMEOPTION_STRENGTH_IN_NUMBERS. That option alone uses ~140 byte per unit without ever beeing used.
     
  16. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    9,238
    Location:
    Poland
    @Thunderbrd left options like this one, as those are his work in progress.
    I guess he didn't knew, that options always use memory.

    You can take look at ecological animals option for example, as this one is unused.
     
  17. billw2015

    billw2015 King

    Joined:
    Jun 22, 2015
    Messages:
    837
    I will check out this feature. If it is required for large maps we should enable it automatically for these maps I guess?

    Well we can call directly the function the exe is using when it deallocates these things (I guess it does this at exit at least). Of course if they aren't exposed via the DLL interface this is more difficult, but the exe code isn't changing again so function offsets and parameters are fixed. Probably this specifically will be very difficult, I need to look into the code to see what is happening before I can comment further really.

    Based on the memory tracking I added (not committed yet) we haven't got much scope for solving this problem with our own data. It has to be a systemic fix to over allocating graphics memory it looks like. If that is viewports then great, we just need to make sure they work and make sure they are used. Otherwise I will be looking into other more esoteric fixes as indicated above!
     
  18. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    Viewports displays a smaller viewport into the full map instead of the full map to save graphics memory.
     
    billw2015 likes this.
  19. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    Another thing that helps a bit is this ini setting it should be set to 1 to save some memory.
    Code:
    Disable PAK memory mapping (May affect performance)
    DisablePAKMemoryMapping = 1
    
     
    billw2015 likes this.
  20. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,513
    Gender:
    Male
    Location:
    Western IL. cornfields
    @Toffer90 ,

    Is the removal of the arrows in City screen City Name bar to move to next city intentional? How do you while in City Screen move to next city now?
     

Share This Page