1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Version 1.4 discussion thread

Discussion in 'Civ4 - Unofficial Patches' started by jdog5000, Dec 7, 2009.

  1. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Download link

    The pace of fixes definitely slowed down, only a handful this time. That's definitely good news! Thanks to Afforess, Emperor Fool, denev, and Arian for their bug hunting and fixing :goodjob:

    Changes in v 1.4:

    - CvGameTextMgr::setBuildingHelp - Fixed issue in mods with display of exposing spies text for buildings which lower espionage defense (thanks Afforess)
    - CvPlayer and CvDLLWidgetData - Fixed bug where you could acquire unlimited free techs from Oracle or Liberalism (thanks Emperor Fool)
    - CvCity - Fixed extra overflow production bug when stopping culture process after border pop (thanks denev)
    - CvUnit::canLoadUnit - Rolled back change blocking switching cargo among transports
    - CIV4BuildingInfos.xml - Fixed incorrect sound for building supermarket, added missing sound for building coal plant (thanks Arian)
     
  2. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Wow, only 5 bugs? I think we've almost got them all now. That's spectacular news!
     
  3. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
  4. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
  5. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    That one is quite strange indeed ... and to be honest my guess would be that ( this time ) it is not the OS that has the blame ...
     
  6. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Shoot, one of the BUFFY testers found that my fix for the free tech thing introduces its own bug: If you load the autosave from the turn that you earned the free tech from Lib or Oracle, it doesn't give you the tech that you select. :(

    The problem is that the popup is created and queued during your "game turn" (after you hit end-turn but before the AIs go. This is where I set a counter saying "next X techs are free" inside chooseTech(). Then the game is saved along with the queued popup.

    If save-game compatibility weren't an issue, I'd just save my counter in the saved game. But that will break SGs, and I think (hope) I can find a solution to this new issue.
     
  7. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Firaxis created a way to solve the save game issue somewhat ... there's a variable saved to indicate save versions basically called uiFlag. So, in CvPlayer::write you can save uiFlag = 2, then in CvPlayer::read you can read in your variable only if uiFlag > 1 for example.

    So, you can load old saves but can't go back to vanilla that way. BBAI uses this, it's worked well and no one has complained.

    For the UP it'd be better to have full compatibility, but this option is there if needed.
     
  8. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    The problem with doing that is it breaks SGs unless everyone agrees to use the same DLL. Sure, that is a good idea anyway, but it's not mandatory right now.

    The original bug also had some form where you could keep doing a reload to get more and more free techs, but I can't think of how that would be possible right now.
     
  9. woc

    woc Chieftain

    Joined:
    May 12, 2008
    Messages:
    35
    Does this unofficial patch fix the OOS on MP games or hasn't that bug been hunted by the debuggers?
     
  10. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Which OOS errors? Are there bug reports somewhere?
     
  11. woc

    woc Chieftain

    Joined:
    May 12, 2008
    Messages:
    35
    I consider this a "no" for an answer.

    Yes, just search here at civfanatics the MP section or just for OOS and you'll see many
    reports of OOS for MP games, even after the 3.19 patch.

    Some claim they never saw them
    Some claim they found a solution by simply clearing the cache
    some said starting up the game while SHIFT pressed solved it
    some claim reducing the map size solves the issue
    some claim disabling the events worked for them
    some claim disabling both events AND starting with shift helped
    (personally i haven't tested disabling the events, because I think, a bug is a bug, and should be fixed by fixing the code, not by disabling the code)

    well, as you know as modder, many people claim many things. I don't claim anything, haven't tested disabling the events, but I do claim there's an OOS issue in the game even after the 3.19 patch.
    So fact is, on a unmodded clean install on a fresh OS install
    of civ IV with BtS and then the patch 3.19 leads to OOS(nothing modded, not
    even the username changed!) :)

    And some claim they had a recurrent OOS. I have never seen this myself,
    but when OOS occurs, my friend just has to leave game, and rejoin(takes a few minutes though and is therefore very annoying)

    OOS starts after around 500turns on marathon gamespeed, I'd say around scientific computing.

    If you have time jdog, i'd love it to see you or any other modders could track down this nasty bug and kill it! :)
     
  12. phungus420

    phungus420 Chieftain

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    To say that there is an issue with OOS errors doesn't help anything. In order to fix the problem the devs of the UP would, at the very least, need to see reproduceable examples of the errors occurring.
     
  13. woc

    woc Chieftain

    Joined:
    May 12, 2008
    Messages:
    35
    believe me, I know! :)

    point is, in my games, they aren't. The user OOS just leaves the game, and rejoins, and you continue. It's not a STOPPER of the game, just takes up to 3minutes to resynchronise... So from my game(s) it's not reproducable..

    some people here at civfanatics claim they have reproducables... Can't confirm this though..

    so, only possibility:"some modders here open a MP game, and play untill it comes and then debug into the code.. put a break on the OOS popup before it hits OOS, and you'll see in the stack where it went wrong(mostly)

    I could send a savegame, with a high change the OOS will happen within 10-20turns...
    sometimes it won't in 50turns.. sometimes it happens every 3-4turns..
    not reproducable, but definatly reoccuring.. so i could send such a savegame if 2 modders here willing to open a savegame and play a few rounds waiting for the OOS to come.

    simply put a break on the OOS pop in the SDK
    once you hit it in the game, just look at the stack.. high chance it'll tell you
    what happened before the OOS hence give you a nice pinpoint location where it went wrong(not what) but I assume most modders can read code and will respond with a :"ahhh, of course' :)
     
  14. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Unfortunately when the OOS is noticed by the network layer is unlikely to be coupled to when it happens in the game code ... for my computer to detect out of sync, it has to send a message across the network saying "Game state is x", then get a reply saying "No, game state is y!" The game code has continued to execute from the moment where the "state is x" message was sent, and even so the moment where the message was sent is probably not the moment where things went wrong ... there could have been one misstep a few seconds before which eventually led to the "state is x" message being sent instead of "state is y".

    Solving OOS errors is whole different kind of debugging than solving CTD or other issues where you can read off the stack right where the problem occurred.

    If you or others can post a reliably OOS save, myself and others can give it a go (I'm out until the new year though) ... but it's a very different kind of weeds to be wading through, and there's no guarantee it's something we'll be able to spot.
     
  15. Cybah

    Cybah Chieftain

    Joined:
    Jun 22, 2007
    Messages:
    1,479
    Somebody has told me, that you can reproduce oos when pressing alt or ctrl when trying to select units within a ship. Can anyone test it?
     
  16. denev

    denev Chieftain

    Joined:
    Jul 5, 2008
    Messages:
    208
    Location:
    Japan
    CvPlayerAI::AI_getStrategyHash() line 14342 and 14393 as UP1.4
    Code:
    		for (iI = 0; iI < MAX_CIV_TEAMS; iI++)
    		{
    			[COLOR="Blue"]if ((GET_TEAM((TeamTypes)iI).isAlive()) && ([COLOR="Red"]iI != getID()[/COLOR]))[/COLOR]
    			{
    				if (GET_TEAM(getTeam()).AI_getWarPlan((TeamTypes)iI) != NO_WARPLAN)
    I don't understand what does this code, but it seems that teamID(iI) is compared with playerID(getID()).
    I have found them when browsing Fall from Heaven 2 source code. (Kael has already fixed them.)
     
  17. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Yes, it looks like it should be

    Code:
    iI != getTeam()
    
     
  18. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Yes, for sure a bug.

    EDIT: That bug occurs in a few places in that function actually.
     

Share This Page