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

Bug Reports and Technical Issues

Discussion in 'Rhye's and Fall - Dawn of Civilization' started by Leoreth, Sep 11, 2014.

  1. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    I am working on this bug right now, but a save from another mod is useless for that.
     
  2. Cypriot

    Cypriot Chieftain

    Joined:
    Jul 24, 2020
    Messages:
    11
    Gender:
    Male
    My city have emigrated to America!
    Spoiler :

    Spoiler :
     
  3. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    :sad:
     
    Hickman888 likes this.
  4. 1SDAN

    1SDAN Brother Lady

    Joined:
    Oct 27, 2014
    Messages:
    2,743
    Firefox blocked the images for a potential security risk. Could someone drag and drop them into the message box as direct attachments?
     
  5. JHLee

    JHLee Prince

    Joined:
    Aug 27, 2013
    Messages:
    498
    Same thing happens with the Tibetan UHV display (Buddhism 25% goal). Which probably means that all religion spread displays are bugged.
     
    Leoreth likes this.
  6. Nyayr

    Nyayr Prince

    Joined:
    May 14, 2008
    Messages:
    369
    Location:
    Holland
    Yeah not sure but might be related to the moving of a city in worldbuilder or that was a coincendence?
     
  7. Seakin

    Seakin Chieftain

    Joined:
    Dec 7, 2019
    Messages:
    48
    Gender:
    Male
    Error after peace with Portugal.
     

    Attached Files:

    Leoreth likes this.
  8. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    I think the error can occur whenever a city object is destroyed and recreated, which happens when a city is moved, but also when a city changes hands in any way.
     
  9. Nyayr

    Nyayr Prince

    Joined:
    May 14, 2008
    Messages:
    369
    Location:
    Holland
    Ah then it is related to the conquest I did on it.
     
  10. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Could be.
     
  11. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Congrats, this save also contains a secret crash for some reason.
     
    1SDAN and DarkLunaPhantom like this.
  12. PinkPallin

    PinkPallin Warlord Supporter

    Joined:
    Apr 23, 2004
    Messages:
    227
    Location:
    Northern Italy
    Las Git update (August 17 1:07AM). Started a new English game, 3000BC Heir Normal: some 275 python exeptions.
     

    Attached Files:

    Leoreth likes this.
  13. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Loaded the game, founded London, ended the turn. No exceptions for me. Is there anything in particular you did?
     
  14. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Okay, this one is too weird not to share in detail.

    The error is not about Judaism being founded at all. Superficially, China discovers a new tech, among others this triggers a dynamic name check and a stability check. To do this, all Chinese cities need to be iterated. Something weird is happening here: China's city list has two cities, but only one of them is actually a city, the other an invalid value (None). When the stability/dynamic name code tries to do anything with that None value, an error occurs.

    How can the game think China has two cities, but one of them isn't really a city? Looking into the save, China only has its capital. I quickly considered the likely reason: you can get the city list from the player itself, or you can get the city from the plot it's on. My get cities by owner function kind of does boths for reasons of... code sharing I think (maybe I need to reconsider this). Analysis shows: the player thinks there is a second city, but the plot it should be on says there shouldn't be a city.

    This is weird because, when a city is founded, it should be added to its plot as well to its player, before the game proceeds and anything else can happen. In particular, all of that should happen before China can discover a tech.

    Took me a while to figure out how that could possibly make sense. First clue: I realised the city was founded through the "AI China gets cities immediately when it builds a settler" rule. Second clue: the city is added to its plot a little later than it is added to its player. This led to me looking into the code being executed in the meantime and I noticed another thing happening there: the tile the city is on is set to be owned (culture covered) by its owner.

    This gave me an idea and I checked the game to confirm: there is indeed a tribal village on the tile before the city gets founded on it. Tribal villages get popped when they are culture covered, and building a city cultured covers its tile before the city gets associated with the plot. The tribal village happened to give China a free tech, triggering the tech discovery code mentioned at the beginning, before that city is properly assigned to its plot. This could only happen because of the special Chinese autofounding rule because normally, tribal villages cannot be popped in the middle of building a city - the settler would have already popped it when moving into the tile before founding the city.

    The solution: make sure to culture cover the tile pre-emptively before founding the city, so all the potential tech related stuff can be resolved earlier.

    But the more interesting aspect is that this is the perfect illustration of the pitfalls of software development and the weird corner case you can run into that nobody could ever anticipate. But also, that I am still somewhat responsible for because I am doing something not really anticipated by the game (founding a city without having a unit on the tile) and writing code that is (probably needlessly) vulnerable to this particular error: listing cities requires both the player list and the plot city functionality. Oh what fun.
     
  15. PinkPallin

    PinkPallin Warlord Supporter

    Joined:
    Apr 23, 2004
    Messages:
    227
    Location:
    Northern Italy
    In order to save the game I had to click on all the exception warnings. That's why I attached the logs, if you want to recreate the errors you have to start a new 3000BC game on Heir/Normal. No errors on Regent.
     
  16. JHLee

    JHLee Prince

    Joined:
    Aug 27, 2013
    Messages:
    498
    yeah, that game was played on the version some commits ago, after I updated the mod on my machine I'm getting the crash as well. ah well.
     
  17. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Save from previous turn that allows reproducing the errors is needed. Your logs did not include PythonErr.log, so not helpful either.
     
  18. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Can you tell me which version that was?
     
  19. JHLee

    JHLee Prince

    Joined:
    Aug 27, 2013
    Messages:
    498
    Is there a way to check pull history on the local repo?
     
  20. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,006
    Gender:
    Male
    Location:
    Faraway
    Yes. It's called the reflog. I'm not sure which client you are using, in the command line you should get something like this:
    Screenshot from 2020-08-18 14-36-52.png
    This is on a local repo on my work laptop, where I checked out DoC on v1.16.2 a while ago and just did another pull. Latest is on top. To the left you can see the abbreviated commit SHA.

    You can do the same with TortoiseGit, here's a link with more info. Not sure how to access it, but the docs mention that it's called "Reference Log" and you need to shift right-click the directory to make it show up in the context menu. It's probably best if you just screenshot what is shown and upload it here.
     
    JHLee likes this.

Share This Page