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 - After the 13th of August 2013

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Aug 13, 2013.

  1. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,311
    Gender:
    Male
    Location:
    MN
    Can you take a snapshot of your boot (see pic)
     
  2. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    You can try setting the memory threshold it aims at to a lower number. I'm not at my computer currently, but its an optional global define, which I have detailed in a couple of other posts somewhere - you need to try setting it to a low value than the 2G it defaults to (its specified in K, so you'll want a value like 1800000 or so)
     
  3. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,954
    Gender:
    Male
    Location:
    Canberra, Australia
    I had the same problem with my graphics driver so decided to upgrade to Windows7 64bit.
     
  4. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Yeh, that's probably a much more sensible upgrade than a graphics card switch.
     
  5. jscolton

    jscolton Chieftain

    Joined:
    Sep 7, 2013
    Messages:
    18
    I'm using Win XP. Not quite sure what the equivalent would be. My boot.ini file is

    Code:
    [Boot Loader]
    Timeout=5
    Default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [Operating Systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional 3GB" /noexecute=optin /fastdetect /3GB
    
     
  6. jscolton

    jscolton Chieftain

    Joined:
    Sep 7, 2013
    Messages:
    18
    I am actually planning to do that in a month or two. Good to know that it might well fix all my C2C problems! :)
     
  7. jscolton

    jscolton Chieftain

    Joined:
    Sep 7, 2013
    Messages:
    18
    OK. I might try that. It does seem to work for perhaps 6-9 turns without crashing (maybe an hour?) so if that doesn't work I may just try to live with lots of quick saves.
     
  8. jscolton

    jscolton Chieftain

    Joined:
    Sep 7, 2013
    Messages:
    18
    Well, I've searched around the past 10-15 mins and haven't been able to locate what you're referring to. Could you please steer me towards more info on that global setting when you get to a computer?
     
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    25,134
    Gender:
    Male
    Location:
    Las Vegas
    Fixed.
     
  10. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,311
    Gender:
    Male
    Location:
    MN
    PINK bth (Mech)
     
  11. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    http://forums.civfanatics.com/showpost.php?p=12765284&postcount=6810 - it's the MAX_DESIRED_MEMORY_USED you need to add and set to a value that will be below 2G (remember the value is expressed in KBytes, so somewhere around 1800000 to be a bit under 1.8G)
     
  12. jscolton

    jscolton Chieftain

    Joined:
    Sep 7, 2013
    Messages:
    18
    Thanks. And which file do I add that parameter to? I couldn't figure that out.
     
  13. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    assets/xml/globalDefines.xml (or actually any of the GlobalDefinesXXX.xml really - all of them get read and effectively concatenated)
     
  14. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Tech TECH_NANOMINING has as a prereq the mis-spelled TECH_BOTATICAL_ALCHEMY
     
  15. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    @DH - crash on load being caused (erratically) by modules/resources/newresources because the XML files there are all named NF_..., two of which refer to schemas also named NF_...schema.xml. HOWEVER, the schema files are actually named NR_...schema.xml

    I have changed the references (since changing the filenames is more painful SVN-wise) and pushed it to SVN. (impovementInfos and unitInfos)
     
  16. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,311
    Gender:
    Male
    Location:
    MN
    NOT a regular C2C python error, just a testing one: I need to find out what the heck this means?????
     
  17. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,954
    Gender:
    Male
    Location:
    Canberra, Australia
    Looking at line 2765 bolded in the code below.
    Code:
    def FindValueFromPercent(mmap, width, height, percent, tolerance, greaterThan):
    	inTolerance = False
    	#to speed things up a little, lets take some time to find the middle value
    	#in the dataset and use that to begin our search
    	minV = 100.0
    	maxV = 0.0
    	totalCount = 0
    	length = width * height
    	for i in range(length):
    		if mmap[i] != 0.0:
    			totalCount += 1
    			if minV > mmap[i]:
    				minV = mmap[i]
    			if maxV < mmap[i]:
    				maxV = mmap[i]
    	mid = (maxV - minV) / 2.0 + minV
    	overMinCount	= 0
    	equalMinCount = 0
    	for i in range(length):
    		if mmap[i] > minV:
    			overMinCount += 1
    		elif mmap[i] == minV:
    			equalMinCount += 1
    	threshold = mid
    	thresholdChange = mid
    	iterations = 0
    	lastAdded = False
    	while not inTolerance:
    		iterations += 1
    		if(iterations > 500):
    			print "can't find value within tolerance, end value = "
    			print "threshold = %f, thresholdChange = %f" % (threshold, thresholdChange)
    			break #close enough
    		matchCount = 0
    		for i in range(length):
    			if mmap[i] != 0.0:
    				if greaterThan == True:
    					if(mmap[i] > threshold):
    						matchCount += 1
    				else:
    					if(mmap[i] < threshold):	
    						matchCount += 1
    [B]		currentPercent = float(matchCount) / float(totalCount)[/B]
    We can see that the divide by zero must refer to totalCount being zero. This variable can only be zero if either or both of the height or width parameter is zero.

    The call to this function is on line line 2291, in GenerateTerrainMap. Which is

    Code:
    		self.desertThreshold = FindValueFromPercent(cm.RainfallMap.data,mc.width,mc.height,DesertPercent,.001,False)
    
    Beyond that it is too early in the morning for me to figure out.
     
  18. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,311
    Gender:
    Male
    Location:
    MN
    What i needed thx.
     
  19. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    Not necessarily. Instead, the values in the mmap array could all be 0.0 since the totalCount is the number of array elements with non-zero values, as calculated near the beginning of the FindValueFromPercent function.

    The mmap array is the cm.RainfallMap in the calling function. There are two immediately apparent ways that it could end up as all 0 values. This array could have been generated as all 0 values. Alternatively every plot on the map was either ocean or a land plot with a temperature below the tundraTemp temperature since plots matching either of those conditions get set to 0 in the rainfall map shortly before the "self.desertThreshold = FindValueFromPercent(blah, blah, blah)" function call.

    So that's a total of 4 possible sources for identified the problem so far:
    a) height is 0
    b) width is 0
    c) cm.RainfallMap array was generated as all 0 values
    d) the map consists of any mix of ocean and land with a temperature less than tundraTemp
     
  20. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,426
    Location:
    Norway
    PerfectMongoose map-generator doesn't generate ice terrain, tested for enormous and immense map sizes.

    Edit: I feel the separation between old world and new world is not very well defined in PerfectMongoose, one map had the old world connected to the new world by land with normal water level as option.
    Very often it's connected by coast not ocean. Tested on gigantic and enormous sizes, but not with water level set to high.

    Perfect world 2f seems to have a better separation though, but I don't really like the huge deserts it creates which covers most of any large landmass except close to coast, the largest deserts are usually of the relative size of Russia and theres often more than 1 huge desert on any maps, but no small ones.
     

Share This Page