Single Player bugs and crashes - After the 13th of August 2013

Well, all is not quite roses.

It turns out that the new video card drivers do not play well with the 3 GB switch. If I boot with the 3 GB switch, all graphics are slow (even in Windows) and it won't even let me start the game. Near as I can tell, it's basically as if I didn't even have a video card. So I have to boot without that switch.

When I boot without the 3 GB switch, I am getting periodic "memory allocation" errors which cause crashes to desktop. Oddly, it doesn't seem like any dump file is created, or I would have attached one. Is that likely to be unavoidable now, or is there anything I can do?

Can you take a snapshot of your boot (see pic)
 
Well, all is not quite roses.

It turns out that the new video card drivers do not play well with the 3 GB switch. If I boot with the 3 GB switch, all graphics are slow (even in Windows) and it won't even let me start the game. Near as I can tell, it's basically as if I didn't even have a video card. So I have to boot without that switch.

When I boot without the 3 GB switch, I am getting periodic "memory allocation" errors which cause crashes to desktop. Oddly, it doesn't seem like any dump file is created, or I would have attached one. Is that likely to be unavoidable now, or is there anything I can do?

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)
 
Well, all is not quite roses.

It turns out that the new video card drivers do not play well with the 3 GB switch. If I boot with the 3 GB switch, all graphics are slow (even in Windows) and it won't even let me start the game. Near as I can tell, it's basically as if I didn't even have a video card. So I have to boot without that switch.

When I boot without the 3 GB switch, I am getting periodic "memory allocation" errors which cause crashes to desktop. Oddly, it doesn't seem like any dump file is created, or I would have attached one. Is that likely to be unavoidable now, or is there anything I can do?

I had the same problem with my graphics driver so decided to upgrade to Windows7 64bit.
 
Can you take a snapshot of your boot (see pic)

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
 
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)

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.
 
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)

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?
 
Thanks. And which file do I add that parameter to? I couldn't figure that out.

assets/xml/globalDefines.xml (or actually any of the GlobalDefinesXXX.xml really - all of them get read and effectively concatenated)
 
Tech TECH_NANOMINING has as a prereq the mis-spelled TECH_BOTATICAL_ALCHEMY
 
@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)
 
NOT a regular C2C python error, just a testing one: I need to find out what the heck this means?????

Traceback (most recent call last):

File "C2C_PerfectMongoose_v310", line 4979, in generatePlotTypes

File "C2C_PerfectMongoose_v310", line 2291, in GenerateTerrainMap

File "C2C_PerfectMongoose_v310", line 2765, in FindValueFromPercent

ZeroDivisionError: float division
ERR: Python function generatePlotTypes failed, module C2C_PerfectMongoose_v310
Traceback (most recent call last):

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.
 
Looking at line 2765 bolded in the code below.
Spoiler :
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.

What i needed thx.
 
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.

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
 
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.
 
Top Bottom