C2C SVN Changelog

Just pushed to SVN (5123):
  • Fixed CTDs reported by various people
  • Fixed bug in odds caching
  • Fixed application of combatMod bonuses of a unit against itself
  • Tweaked AI attack stack am-I-big-enough evaluation slightly

Note - I never had a 100% certain test case for the CTD, but I found a bug that is implicated in the provided minidumps, and all 3 posted saves complete turns fine with the putative fix. If the original reporters of the CTDs could also verify it works now that would be useful please.

@TB - this does not include your proposed change to CvUnit::maxCombatStr(). Something there **may** still be necessary, but I don; see a hole in the code currently (though you may have test cases I don't)
 
I have played 3 turns past my CTD. All Okay. :goodjob::thumbsup:

JosEPh
 
Hmm took me an hour just to find out that my UserSettings folder is not compatible with SVN 5123,24. Getting a CTD in any attempt to run any save game/scenario. Too bad.
 
Hello,

I am starting a new game in version 28,
so I'd like to ask when will approximately version 29 be ready?
 
Updates

- Remove the free settled slaves from the Slave market.
- Attempt to fix Joseph's Python exception problem when attacking pirates.

Edit

- Captives fix again. (Maybe I should not be doing this at 3am.)
- Remove CIVIC_SLAVERY from Project_Hades/Buildings
 
Just pushed to SVN (5131):
  • Fixed bug whereby AI infinitely builds hunters
  • Allowed AI to scrap hunters when it has surplus

Also just pushed some fixes to settled slave Python (rev 5132).

@DH - the changes are as follows (all in CvRandomEventIntrerface.py):

1) The routine to add a settled slave gave Python errors due to using variables before they were initialized (reordered to fix)

2) It also gave a bunch of debugging messages that the end user shouldn't see - I assume you pushed a version you were still testing - anyway - removed them after I got it working

3) It (99.99% certainly) wasn't doing what you intended - using 'alterSpecialistCount' just reassigns population exactly like when a user clicks a + button on one of the specialists. So what it actually did was to remove a pop from working a plot and attempt to increment the settled slave specialist count, but actually didn't because that is not a valid specialist (not enabled, which is right or else the user would be able to have pop work as settled slaves arbitrarily). I therefore changed it to changeFreeSpecialistCount, so that settling the captive gives you an EXTRA specialist as a free one (I also changed the worldview removal code that frees slaves to match). This **may** also not be quite what you intended since it means that a settled slave ADDs to the available net food in the city (the specialist produces 1 food but because it's not a population [free specialists aren't] it doesn't consume any). This can be fixed (if it's not what was intended) in one of two ways:
3.1) (easiest and recommended) just change the definition of the settled slave specialist to account for the fact that it doesn't consume anything (so change +1 to -2 for food probably)
3.2) Don't use free specialists either. If you go down that road the Python gets more complex - you'll need to use forcedSpecialists and also need to increase the city's population when you settle one. This is more complex so I don't recommend it (makes freeing them more complex too)
 
- Attempt to fix Joseph's Python exception problem when attacking pirates.
Joseph's Python exceptions are the result of a C++ exception (crash) that likely occurs somewhere in the combat odds help string generation (might also be related to issues that Koshling has been fixing seeing that Joseph got a crash soon after). So I fear your changes doubled the call and therefore might also double the error message.
So I suggest undoing that change or at least storing the result in a variable instead of calling the function twice.
 
Joseph's Python exceptions are the result of a C++ exception (crash) that likely occurs somewhere in the combat odds help string generation (might also be related to issues that Koshling has been fixing seeing that Joseph got a crash soon after). So I fear your changes doubled the call and therefore might also double the error message.
So I suggest undoing that change or at least storing the result in a variable instead of calling the function twice.

Not following. Which function?
 
Not following. Which function?
Joseph has been getting Python error popups when he holds the right mouse button over a dragon boat unit, which is the situation in which the combat odds help stuff is displayed.
When you call a C++ function from Python and it crashes then you can get such an error popup (if you have the popups activated) but the application keeps running.
The Python code piece in this case is harmless (and working as intended). It just forwards the returned help string to the display on the screen. DH's change doubles the call to create the help string, checking if it returns None the first time. But that is not a cheap function. It is a call to the exe but the exe then calls back into the DLL to the function in CvGameTextMgr that belongs to what the mouse currently points to. In this case CvGameTextMgr::getPlotHelp which in turn calls setCombatPlotHelp in this situation. That calculates and displays combat odds and is the most likely culprit for the crash. I have not looked into what issue you fixed with combat odds but it seems to me like there is at least some chance that those issues are related.
If not, then there might be some other issue in there related to the specific unit or its promotions in Joseph's case.

In any case, the change that DH made does not fix the issue but it doubles the call to this somewhat expensive function so I asked to undo it.
 
Joseph has been getting Python error popups when he holds the right mouse button over a dragon boat unit, which is the situation in which the combat odds help stuff is displayed.
When you call a C++ function from Python and it crashes then you can get such an error popup (if you have the popups activated) but the application keeps running.
The Python code piece in this case is harmless (and working as intended). It just forwards the returned help string to the display on the screen. DH's change doubles the call to create the help string, checking if it returns None the first time. But that is not a cheap function. It is a call to the exe but the exe then calls back into the DLL to the function in CvGameTextMgr that belongs to what the mouse currently points to. In this case CvGameTextMgr::getPlotHelp which in turn calls setCombatPlotHelp in this situation. That calculates and displays combat odds and is the most likely culprit for the crash. I have not looked into what issue you fixed with combat odds but it seems to me like there is at least some chance that those issues are related.
If not, then there might be some other issue in there related to the specific unit or its promotions in Joseph's case.

In any case, the change that DH made does not fix the issue but it doubles the call to this somewhat expensive function so I asked to undo it.

Ah ok. What save do I need and what units do I need to check hover text on to reproduce this?
 
Just pushed to SVN (5131):
  • Fixed bug whereby AI infinitely builds hunters
  • Allowed AI to scrap hunters when it has surplus

Also just pushed some fixes to settled slave Python (rev 5132).

@DH - the changes are as follows (all in CvRandomEventIntrerface.py):

1) The routine to add a settled slave gave Python errors due to using variables before they were initialized (reordered to fix)

2) It also gave a bunch of debugging messages that the end user shouldn't see - I assume you pushed a version you were still testing - anyway - removed them after I got it working

3) It (99.99% certainly) wasn't doing what you intended - using 'alterSpecialistCount' just reassigns population exactly like when a user clicks a + button on one of the specialists. So what it actually did was to remove a pop from working a plot and attempt to increment the settled slave specialist count, but actually didn't because that is not a valid specialist (not enabled, which is right or else the user would be able to have pop work as settled slaves arbitrarily). I therefore changed it to changeFreeSpecialistCount, so that settling the captive gives you an EXTRA specialist as a free one (I also changed the worldview removal code that frees slaves to match). This **may** also not be quite what you intended since it means that a settled slave ADDs to the available net food in the city (the specialist produces 1 food but because it's not a population [free specialists aren't] it doesn't consume any). This can be fixed (if it's not what was intended) in one of two ways:
3.1) (easiest and recommended) just change the definition of the settled slave specialist to account for the fact that it doesn't consume anything (so change +1 to -2 for food probably)
3.2) Don't use free specialists either. If you go down that road the Python gets more complex - you'll need to use forcedSpecialists and also need to increase the city's population when you settle one. This is more complex so I don't recommend it (makes freeing them more complex too)

The only documentation I have access to is A Sid Meier's Civilization IV Python Class Reference Brought to you by Apolyton CS

Which has
Code:
7. VOID alterSpecialistCount (SpecialistType eIndex, INT iChange)
     int (int /*SpecialistTypes*/ eIndex, int iChange)

....
53.  VOID changeFreeSpecialistCount (SpecialistType eIndex, INT iChange)
    int (int /*SpecialistTypes*/ eIndex, iChange

When I tested it it did put a Settled Slave in.:crazyeye: I did not check for a change in population though.

3.2) It should be the same as settling GGs or other Great People. It should not increase the population at all.
 
The only documentation I have access to is A Sid Meier's Civilization IV Python Class Reference Brought to you by Apolyton CS

Which has
Code:
7. VOID alterSpecialistCount (SpecialistType eIndex, INT iChange)
     int (int /*SpecialistTypes*/ eIndex, int iChange)

....
53.  VOID changeFreeSpecialistCount (SpecialistType eIndex, INT iChange)
    int (int /*SpecialistTypes*/ eIndex, iChange

When I tested it it did put a Settled Slave in.:crazyeye: I did not check for a change in population though.

3.2) It should be the same as settling GGs or other Great People. It should not increase the population at all.


GGs etc. are free specialists, so my change is probably what you intended then.
 
Joseph's Python exceptions are the result of a C++ exception (crash) that likely occurs somewhere in the combat odds help string generation (might also be related to issues that Koshling has been fixing seeing that Joseph got a crash soon after). So I fear your changes doubled the call and therefore might also double the error message.
So I suggest undoing that change or at least storing the result in a variable instead of calling the function twice.

How do I do a revert to previous version in tortoise?
 
This is the first report (with some more later). Seems to be when you try to get the combat odds hover against Dragon Ships:
http://forums.civfanatics.com/showpost.php?p=12313509&postcount=889

He did not post a savegame until the one with the EoT crash I think.

In the only save game he HAS posted (http://forums.civfanatics.com/showpost.php?p=12315277&postcount=919 is the only one I can find), selecting the Outrigger that is near the enemy Dragon ship and getting the hover odds works fine, so not much I can do to diagnose the issue. If someone could post a save in which it happens from the save position that might help...
 
How do I do a revert to previous version in tortoise?
When you want to undo the changes to a specific file in a specific revision, show the log, select the revision, then right click on the file in there and choose 'Revert changes from this revision'.
 
Back
Top Bottom