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

Single Player bugs and crashes v38 download - After the 20th of February 2018

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Feb 24, 2018.

  1. Dayn77

    Dayn77 Chieftain

    Joined:
    May 27, 2019
    Messages:
    2
    Gender:
    Male
    Thank you. I didnt notice this option. I´ll try to read the settings more carefully... :) Thanks again for quick reply.
     
    raxo2222 likes this.
  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,630
    Location:
    Norway
    @KaTiON_PT: Another thing that should be changed in relation to my last post...
    Spoiler Code :
    Code:
    EraTypes CvGame::getHighestEra() const
    {
        int iI;
        int iHighestEra = 0;
        int iLoopEra;
     
        for (iI = 0; iI < MAX_PLAYERS; iI++)
        {
            if (GET_PLAYER((PlayerTypes)iI).isAlive())
            {
                iLoopEra = GET_PLAYER((PlayerTypes)iI).getCurrentEra();
    
                if(iLoopEra > iHighestEra)
                {
                    iHighestEra = iLoopEra;
                }
            }
        }
    
        return EraTypes(iHighestEra);
    }
    EraTypes CvGame::getCurrentEra() const
    {
        int iEra;
        int iCount;
        int iI;
    
        iEra = 0;
        iCount = 0;
    
        for (iI = 0; iI < MAX_PLAYERS; iI++)
        {
            if (GET_PLAYER((PlayerTypes)iI).isAlive())
            {
                iEra += GET_PLAYER((PlayerTypes)iI).getCurrentEra();
                iCount++;
            }
        }
    
        if (iCount > 0)
        {
            return ((EraTypes)(iEra / iCount));
        }
    
        return NO_ERA;
    }
    ... is that MAX_PLAYERS should be changed to MAX_PC_PLAYERS, as the era of the NPC teams are completly inconsequential to the game in almost any and all ways, only real players should contribute to the result of these function calls.

    Edit: { Bigger project, not that important either.
    Another improvement would be if the highest and current era for the game scope is cached as variables within the game object, and only updated every time a player reach a new era.
    That way we could reduce the amount of times those "for all players" loops is processed as any code that needs the value of game.highestEra and game.currentEra could just get the cached value instead of calculating it every time.
    The amount of RAM needed for caching two enumeration variables is so little that I believe it is worth the reduction in code processing.

    game.GetHighestEra() isn't that much used in code, but game.getCurrentEra() is called once every turn if you play with revolutions, then another time every turn if you play with "barbarian civ", and it is also called every time the game makes an autosave, that is at the most 3 calls each turn from python alone.
    game.getCurrentEra() is called a lot more in the dll code. Hard to say exactly how often it is called per turn in the dll, it can vary from turn to turn, and depend on how many AI players are in the game.
    }
     
    Last edited: May 28, 2019
    KaTiON_PT likes this.
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    I agree - would be fairly easy to cache the game era rather than having it run the check every time. When the tech is earned by a valid player to enter a new era, the game should be updated.
     
    Toffer90 likes this.
  4. Katamariguy

    Katamariguy Chieftain

    Joined:
    Dec 7, 2014
    Messages:
    4
    Location:
    South Korea
    I'm playing alone on the Small World map with space terrain. I've laid out a few space stations but trying to upgrade them with heavy rockets has no effect. A few dozen turns have passed since they've been created and they're still level 1.
     

    Attached Files:

  5. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    Something in Python is wrong.
    Code:
    Traceback (most recent call last):
    
      File "CvEventInterface", line 32, in onEvent
    
      File "BugEventManager", line 297, in handleEvent
    
      File "BugEventManager", line 301, in _dispatchEvent
    
      File "", line 9, in doOutcome
    
    RuntimeError: unidentifiable C++ exception
    ERR: Python function onEvent failed, module CvEventInterface
    @Toffer90 should be able to fix it.

    Spoiler :

    Civ4BeyondSword 2019-06-03 16-10-07-96.png


    Looks like one tag that I removed due to validator protests two months ago was needed after all.
    Now you can upgrade space stations - update SVN.
     
    Last edited: Jun 3, 2019
  6. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    @Thunderbrd it appears you need to make some changes in Pepper's unit schema due to XML validator protests - removing PythonName tag made impossible to upgrade space stations and nothing else it seems otherwise players would report stuff earlier.
    So I had to revert removal of this tag.

    Code:
    Caveman2Cosmos XML Validator 1.3 by Alberts2
    -----------------------------------
    -----------------------------------
    Validating files in the current directory and all subdirectories
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:283,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:329,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:429,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:524,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:629,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:761,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:853,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:960,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:1085,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:1191,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:1310,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:2844,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:3024,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:3210,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4481,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4514,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4640,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4673,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4706,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4739,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4770,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4870,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4903,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4936,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:4969,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5004,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5039,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5074,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5109,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5144,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5179,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5214,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5249,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5284,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5319,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5354,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5387,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5494,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5529,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5562,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5597,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5696,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5729,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5762,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5862,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5895,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:5995,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6095,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6128,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6245,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6278,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6311,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6344,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6375,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6406,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6438,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    \Caveman2Cosmos\Assets\Modules\Pepper2000\P2K_CIV4UnitInfos.xml:6470,30: Element 'x-schema:P2K_CIV4UnitSchema.xml:PythonName' was undeclared.
    -----------------------------------
    -----------------------------------
    
     
  7. Katamariguy

    Katamariguy Chieftain

    Joined:
    Dec 7, 2014
    Messages:
    4
    Location:
    South Korea
    May I ask how you get your game's UI to look like that?
     
  8. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    Have you tried to update his unit schema to the latest version in the core?
     
  9. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    I have PPIO modmod.

    No XML files except this Pepper's unit file (P2K_CIV4UnitInfos.xml) contain PythonName tag.
    This means all schema files doesn't have PythonName tag.
     
    Last edited: Jun 3, 2019
  10. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,630
    Location:
    Norway
    This python error makes very little sense... It says the error happened at line 9 inside a python file with no name inside the function called "doOutcome", a function that doesn't exist in any python files at all.

    Then it says that whatever python did here made the dll freak out, so I guess there was a call from python to dll inside this imaginary piece of python code where the dll never gave python an answer.

    Edit: Now, much of this can be explained by this python code actually being in an xml file, a unitXML file that is. I have no idea how this stuff works when in an xml file and very much handled by the dll at that point.
     
    Last edited: Jun 3, 2019
  11. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    It never caused DLL crash.
    It happened when I tried to use Heavy Rocket to upgrade space station improvement lo level 2 - while it said mission was successfully it didn't do anything - same thing as reporter above.

    I fixed that by adding <pythonname> tags, that I removed two months ago - I removed them because validator was screaming, as pythonname tag doesn't exit in schema files at all.
     
  12. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    So is the PythonName tag included in Pepper's schema?
    Going by this, it isn't. Ok, so it was probably added there then later overridden by an update.
     
  13. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    You missed second sentence :p
    I also wrote name of single file that contained this tag :p

    It appears you never added that to schema files.

    AIAndy added that to code (c++) in SVN 7018.
    Schema files never got updated with this.
     
    Last edited: Jun 3, 2019
  14. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    Well then it wasn't mine to add but his. He didn't always set up his tags to work with the schema before the validator was made. I suppose I should figure out how that tag needs to be included but it might cause more problems to try and do it wrong than just leave it. May be very easily done wrong tbh - since it's a bit more function capable than most tags and may not work as I expect it to.
     
    raxo2222 likes this.
  15. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,427
    Location:
    Poland
    @alberts2 could add exception for pythonname tag in his validator then.
    Only Pepper uses this - its for his space units.
     
  16. Yudishtira

    Yudishtira Spiritual/Creative

    Joined:
    Nov 2, 2012
    Messages:
    2,683
    Location:
    Brisbane
    At the start of a new play session, tech leader Brazil will trade me any tech I want. At the next end turn, this resets, his deep distrust of/rivalry with me kicks back in, and he won't trade me any of them - which I suspect is the 'correct' state of affairs.

    This applies to all other civs. I give the example of Brazil because they're the only ones with techs I don't have right now. It's a minor bug in itself, but it might point to some others/answer some questions, as in who knows what else is not getting initialised properly at game load (strictly speaking, at save load).
     
  17. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    IIRC, leaders are meant to sway a bit in their will to do things. I don't know much of anything about the diplomacy codes and am not too willing to investigate into them, particularly being such a strong advocate of turning off tech trading in games entirely. I just don't know what it's supposed to behave like in the first place.
     
  18. Yudishtira

    Yudishtira Spiritual/Creative

    Joined:
    Nov 2, 2012
    Messages:
    2,683
    Location:
    Brisbane
    This is a bug, not a natural 'sway'. It is all-or-nothing, and always and consistently in the one direction: between save load and end turn, all techs available; then after end turn, he won't trade any.

    I report it because it proves that at least one thing is not properly initialised at save load at the start of a session. It's possible that other things are not initialised either, and that this explains some current or future bug that defies explanation otherwise.
     
  19. T-6000

    T-6000 Chieftain

    Joined:
    Apr 18, 2019
    Messages:
    9
    Gender:
    Female
    I've noticed this too, exactly as described. In my case it's happened with fairly recent SVN versions - I can't say if it still happens in the most recent ones (I've been playing the same game for a while and I now have a comfortable lead), but it was certainly happening post-version-10500 at the least. It didn't happen every time I loaded a game, but it was probably more common than not. This is on emperor difficulty so I'd expect AIs to generally be pretty stingy about tech trades, which they almost always were except for immediately after loading the game.
     
  20. Glorious Leader

    Glorious Leader Chieftain

    Joined:
    Feb 8, 2016
    Messages:
    19
    Gender:
    Male
    Location:
    Indiana USA
    v38.5, I'm having a instant and repeatable CTD when trying to merge units, I select the merge button and when I hit the other unit to merge with it instantly crashes. This is my first time playing with size matters so I'm also wondering if I'm doing something wrong, I have three stone axemen all with the same promotions, experience, health, etc, so I'm pretty sure it should let me merge them, but it instantly crashes. In the save provided the three axemen can be found in the forest north of my capital, I also provided the minidump file. Sid Meier's Civilization 4  Beyond Sword Screenshot 2019.06.30 - 15.08.29.48.png
     

    Attached Files:

Share This Page