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

V24 bug

Discussion in 'Bugs and Crashes' started by God-Emperor, Jul 4, 2012.

  1. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,005
    Gender:
    Male
    Location:
    Western IL. cornfields
    I didn't even see a file to d/l SO.

    I'll try again.

    JosEPh

    Edit: This is all you get:

    With No D/L link at all.
     
  2. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,291
    Gender:
    Male
    Location:
    MN
    It might be that since i am the author, i am the only one authorized for now.

    Its only 1 file so here it is for now. . .
     
  3. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,905
    Gender:
    Male
    Location:
    Canberra, Australia
    I just love divides by zeros:rolleyes: This one is in the line
    Code:
    	if( game.getGameTurn()%int(RevUtils.getGameSpeedMod()*10) == 0 ) :
    
    which calls
    Code:
    def getGameSpeedMod( ) :
    		# Ratio of game turns to those of Epic, limited adjustment for extremely short/long differences
    		global gameSpeedMod
    		if( gameSpeedMod == None ) :
    			gamespeed = game.getGameSpeedType()
    			gameSpeedMod = gc.getGameSpeedInfo(gamespeed).getGrowthPercent()
    			gameSpeedMod += gc.getGameSpeedInfo(gamespeed).getTrainPercent()
    			gameSpeedMod += gc.getGameSpeedInfo(gamespeed).getConstructPercent()
    			gameSpeedMod = 300.0 / gameSpeedMod
    		return gameSpeedMod
    
    Which suggests it is something to do with game speed. What game speed are you using? We have had this problem before, now that I think on it. wonder what we did to fix it that time.
     
  4. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,392
    The reason for that is clear. The percentages for the slow speeds are very large and add up to far more than 300 so 300 / large number is considerably smaller than one. That turns into 0 if you turn it into an int and then the modulo divides by 0.
     
  5. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,905
    Gender:
    Male
    Location:
    Canberra, Australia
    So what values should I use, or should I just change any zeros to one.?
     
  6. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,392
    Depends on what the rev mod uses this for. You could increase the 300 to whatever the sum is for the slowest game speed and then reduce the *10.
     
  7. dusckr87

    dusckr87 Chieftain

    Joined:
    Feb 7, 2010
    Messages:
    595
    Eternity. Which explains why it happened after my last "working" copy of the SVN (2983), because I seem to recall that gamespeeds were "tweaked" afterwards.

    EDIT---yep, just checked the log and see it happened in #3000.
    EDIT2---for some reason the problem went away. The only thing different I did was play a different mod, and then went back to this one. I can no longer reproduce the error, no matter what I do, whereas last night it happened every time. I posted this in the idea tracker site as well, so now I have to edit that.
    EDIT3---of course, now it goes back to errors. Reloading a save game, and then starting a new game (or simply playing the saved game) is what seems to make the errors stop. Starting a new game from the menu "cold" is what appears to make the errors occur.
     
  8. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Or just make it max(1,<the previous calculation>)
     
  9. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,291
    Gender:
    Male
    Location:
    MN
    Repeatable CTD (at end of turn), attached minidump/autosaved game SVN 3020


    fixed by Koshling thx.
     
  10. Stormwind

    Stormwind Chieftain

    Joined:
    Dec 7, 2008
    Messages:
    697
    Revision 3021 (probably the same error that was reported by dusckr87)

    From PythonErr.log

    Traceback (most recent call last):
    File "BugEventManager", line 363, in _handleDefaultEvent
    File "RevEvents", line 121, in onEndGameTurn
    ZeroDivisionError: integer division or modulo by zero

    This happens at the end of every turn.
     
  11. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,905
    Gender:
    Male
    Location:
    Canberra, Australia
    Just posted a probable fix to the SVN. Are you using the SVN? If not don't worry, but if you are then you are the test subject I need:D:mischief:. If so update and tell me if the problem is fixed or if I have caused any other problem. Thanks.
     
  12. Stormwind

    Stormwind Chieftain

    Joined:
    Dec 7, 2008
    Messages:
    697
    Seems to have worked. The error message is gone. I currently see no other problem.
    Thank you!
     
  13. Sarah Starlight

    Sarah Starlight Chieftain

    Joined:
    Jul 6, 2012
    Messages:
    81
    http://caveman2cosmos.t15.org/Ideatracker/view.php?id=47
     
  14. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,291
    Gender:
    Male
    Location:
    MN
    @DH

    You have some error messages from the last SVN you submitted:

    Fixed below by DH, thx.
     
  15. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,905
    Gender:
    Male
    Location:
    Canberra, Australia
    I must have copied the wrong version of the schema. Testing now...
     
  16. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,392
    Only the three lowest difficulty settings can get tribes from goody huts. It might be useful to reduce that to the lowest or two lowest though because yes, it is a serious advantage but on the other hand, nearly no one plays on those difficulty settings.
     
  17. dusckr87

    dusckr87 Chieftain

    Joined:
    Feb 7, 2010
    Messages:
    595
    Yep, the SVN revision fixed it. I replaced my zipped version of V24 with this one (3022) for archive purposes.
     
  18. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,291
    Gender:
    Male
    Location:
    MN
    I keep getting these, what look like graphic glitches/crashes??

    SVN 3029

    dump/save included. fixed by Koshling thx

    EDIT EDIT another minidump
     
  19. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,291
    Gender:
    Male
    Location:
    MN
    To all modders:

    When something like this:

    Spoiler :
    Code:
    		<TerrainInfo>
    			<Type>TERRAIN_LUNAR_BASALT</Type>
    			<Description>TXT_KEY_TERRAIN_LUNAR_BASALT</Description>
    			<Civilopedia>TXT_KEY_TERRAIN_LUNAR_BASALT_PEDIA</Civilopedia>
    			<ArtDefineTag>ART_DEF_TERRAIN_LUNAR_BASALT</ArtDefineTag>
    			<Yields>
    				<iYield>0</iYield>
    				<iYield>1</iYield>
    				<iYield>0</iYield>
    			</Yields>
    			<RiverYieldChange/>
    			<HillsYieldChange/>
    			<bWater>0</bWater>
    			<bImpassable>0</bImpassable>
    			<bFound>1</bFound>
    			<bFoundCoast>0</bFoundCoast>
    			<bFoundFreshWater>0</bFoundFreshWater>
    			<iMovement>2</iMovement>
    			<iSeeFrom>1</iSeeFrom>
    			<iSeeThrough>1</iSeeThrough>
    			<iBuildModifier>0</iBuildModifier>
    			<iDefense>0</iDefense>
    			<Button>Art/Interface[B][U]\Interface[/U][/B]\Buttons\WorldBuilder\lunarbasalt.dds</Button>


    also

    Spoiler :
    Code:
    MissingArt: Art/Interface\Buttons\WorldBuilder\lunarbarren.dds
       Used: fury terrain/civ4terraininfos.xml at line 3508



    comes up with an error, do you want to take care of it, or would you rather have me take care of it?:confused:
     
  20. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,062
    Location:
    America
    If it causes load errors, fix it. That's my perspective.
     

Share This Page