A New Dawn Beta Builds

I had a save where ending a turn and loading the save again was reliably crashing the game. The debugger told exactly that it is a heap corruption, then all I did was googling on how to use the appverifier/gflags tool to trace bugs like this down. These are really ugly ones, as the CTD used to happen very far from the faulty code. The tools place a protected area before or after the allocated memory, so when the bug tries to overwrite these, it is causing an immediate fault so you can catch it. Typically these are the errors which make the debug work, but crash the release (a harmless overwrite may become deadly within the more compact release version).

Thank you, I see, that tool actually allocates a bigger memory space than requested, and adds tags before and after, just like what most of memory manager does.

So, after you check the code by GF, you had not find any more memory overwirte bugs, had you?
 
So, after you check the code by GF, you had not find any more memory overwirte bugs, had you?

None, but I was aiming specifically at this CTD, which does not detect all possible over/underwrites. Considering the complexity of the code, I am quite sure there are still some lurking around. Unfortunately, you cannot check the entire memory allocation scheme of Civ4 at once, as the heap debugging takes lots of extra memory and the game is big. A full page heap debug runs out of the 2GB address space before the main menu loaded. I did not try to force /LARGEADDRESSAWARE though. So in similar cases we have to find the heap block which was causing a CTD, and guard that piece only. You can do it with /size in gflags.

But you need a CTD first, which I do not have at the moment :)
 
playing 2.81 + beta 3.

I see one problem with flexible difficulty:

The human player seems to be very strong in the opening phase but after a short time
the difficulty level rises too fast up so you stay among the top 20% for a very long time.

also if you are descending to the average and loose cities etc. your enemies will stay crazy
overpowered... though you don´t reach the least 20% because with Revolutions on there
will be always plenty of civs who are much worse than you...

my suggestion would be:

top 20%: increase +1

not top 20%: decrease -1 until "prince" or "noble"

last 20%: decrease -1 to the beginner levels

(maybe 40 rounds or even more should be by far enough to calculate)

I love this option but with snail it gets balls to the wall... :-)

oh and I had one ctd in 550 turns (snail)!

regards

I second this suggestion. In the middle, pick the level where the AI don't get advantages. Don't remember which one it is.

Also, the middle could perhaps be 21-50% instead of 21-79%


I haven't played the new beta yet, but also saw this and was intrigued. In all honesty, I would like to see the flexible difficulty work this way (or maybe create it as another option).

You move up as prescribed, but you cannot move below your original starting difficulty. I usually start at their Emperor or Immortal, and like the fact that I really struggle in the beginning game. I would hate to drop down to something like prince then have several hundred turns before getting back to something more difficult.

since I haven't tried it in real life, I should probably wait until I have the experience first hand :)

Afforess -- excellent mod -- I cannot tell you how much I have enjoyed playing AND. Finished my latest game on Immortal with a very lucky scientific victory beating out a spaceship by about 5 turns.

Glad you all are enjoying it. As for flexible difficulty, I'm thinking about raising the boundaries for both ends to 30%, (face is, if you're in the bottom 30%, you're doing pretty terrible). Then, I'll add a switch to make it so you can't fall below your own difficulty setting. It'll be off by default, but you guys can just turn it on. PS, look at the bottom of the GlobalDefinesAlt.xml, in the XML folder, I have some AND customizable components you can play with.

4. Civics still need tweaking. I don't know, maybe it just my conformity but monarchy/republic, free church (I like Shwedagon Paya very much :) the sooner the better), bourgeois and patrician (do people realize, how strong these two are??) is my only choice.

5. I'm not sure, but I got the feeling that productivity (nice increase) and food production (reasonable decrease) has been tweaked in a very good way. Is that true?

Yeah, Only the Government Civics are more balanced. It's a sign of positive progress that you like Monarchy now too. Fascism could be useful in a prolonged late game war, I suppose. Still needs work though.

6. I don't know why is it so, but the power of civilizations in RoM/AND has nothing to do with reality. I just look on my list (10 civs) and I see Babylonian and Aztec on top, and Germans and French on the bottom :lol: By the way, I see Franco and Richelieu (I really appreciate graphic work, however he is a little bit odd :)) - forgive my incompetence, but have you incorporated new leaders to 1.6? Or I just had no luck to meet these guys before?

Revolutions makes it so certain leaders win and certain lose. Organized and Financial leaders seem to do better, as they avoid Financial instability better.

7. I made a small experiment, and changed the value of GP appering (reduce to 50) and now it seems that bulbing a tech by a GP is worth doing it again. However, I can totally understand possible opinion that I went much too far :D

Hmm, I may need to look into that. GP are not balanced at all in AND.

I used Free Church and Caste till the end of the game, the former for the religion power, which not decreases over time and techs, and the latter for the amazing food bonus. IMO, they need tweaking too.

Yep. All the other civic categories need work.

I was just fortunate enough to have a CTD which I could reproduce, then the tools traced it down... ;) The second one was just pure luck.

I am not a pro at all, at least I am not earning my money purely by C++ coding, although it is part of my work. I think I am unable to contribute to projects regularly, but if I am going to have other CTDs while playing, I will try to debug them.

Well thanks for that find anyway, hopefully it stops some of the issues people have been having.


To Afforess:

Could you give the read-only SVN accounts of your project to me and other guys who can debug the code by VC? It will help us tracing down the bugs and reporting them. Eh, Did you establish the SVN depository yet?

That's all OK if you would not, to modify and update the source termly by one person also is a good solution.

When I get it established, It will be public for read, but I'll give you the link.
 
6) I think Town Watchmen are great, but they should have a reduction in strength outside of cities. As it is, they make superb stack defenders even in enemy territory. Please consider giving them something like -40% strength and +80% city defence.
I like this idea.:)
 
Is it really a good idea? 4 -40% + 80% = 4.32; 4 x 1.4 = 5.6.
 
None, but I was aiming specifically at this CTD, which does not detect all possible over/underwrites. Considering the complexity of the code, I am quite sure there are still some lurking around. Unfortunately, you cannot check the entire memory allocation scheme of Civ4 at once, as the heap debugging takes lots of extra memory and the game is big. A full page heap debug runs out of the 2GB address space before the main menu loaded. I did not try to force /LARGEADDRESSAWARE though. So in similar cases we have to find the heap block which was causing a CTD, and guard that piece only. You can do it with /size in gflags.

But you need a CTD first, which I do not have at the moment

Thanks. Indeed the memory overwrite is the most rebarbative one of all bugs. I'm playing a new game by using the DLL based on the code you changed. Until now, it's fine.

When I get it established, It will be public for read, but I'll give you the link.

Thank you. Hope that by then I can help you.

As mentioned above, Although untill now there is no crash, but that stupid onEndPlayerTurn error message comes back again. I'm not sure whether it's casued by the latest changes. Could you tell me where the code caused it before? I'm just starting to resolve this problem.
 
I'm sad to say, Stalin thinks he's Cathrine...

There was a revolution in Russia where Cathrine took over for Cathrine, and I naturally thought that was weird, so I contacted "Cathrine" and saw the Stalin leaderhead
 

Attachments

  • Civ4ScreenShot0007.JPG
    Civ4ScreenShot0007.JPG
    117.8 KB · Views: 100
Thanks. Indeed the memory overwrite is the most rebarbative one of all bugs. I'm playing a new game by using the DLL based on the code you changed. Until now, it's fine.



Thank you. Hope that by then I can help you.

As mentioned above, Although untill now there is no crash, but that stupid onEndPlayerTurn error message comes back again. I'm not sure whether it's casued by the latest changes. Could you tell me where the code caused it before? I'm just starting to resolve this problem.

The last error was because someone was using an uninitialized variable in the return statement, in BarbarianCiv.py. As for those two, you might want to check your PythonErr.log file. They could point out where the issue is in those python files.
 
I'm sad to say, Stalin thinks he's Cathrine...

There was a revolution in Russia where Cathrine took over for Cathrine, and I naturally thought that was weird, so I contacted "Cathrine" and saw the Stalin leaderhead

That's an issue with RevDCM. I'd post over there

PS. is anyone else getting a lot of database errors today? The forums seem glitchy on my end.
 
That's an issue with RevDCM. I'd post over there

PS. is anyone else getting a lot of database errors today? The forums seem glitchy on my end.

Yeah, its been that way ALL day today, it isnt that bad if your just scanning thru stuff, but if you want to write something, its take forever and stalls, and then "Try again" appears.:(
 
The last error was because someone was using an uninitialized variable in the return statement, in BarbarianCiv.py. As for those two, you might want to check your PythonErr.log file. They could point out where the issue is in those python files.

Not just these two, there are more errors that all about end turn event. Thank you, I will check it.
 
Ok, the issue of poping up onEndPlayerTurn error messages had been resolved!

That's because of some city name strings or civilization description strings can not be encoded into 'latin-1' from unicode by Python.

for example:

File: Revolution.py Line: 2055
Code:
if(  RevData.getCityVal(pCity, 'WarningCounter') == 0 ) :
                    # Warn human of impending revolution (note can't instigate on warning turn)
                    if( self.LOG_DEBUG ) : CvUtil.pyPrint("  REVOLT - %s (%s) is over %d warning threshold in year %d!!!!"%(pCity.getName(),pPlayer.getCivilizationDescription(0),int( self.warnFrac*cityThreshold ),game.getGameTurnYear()))
                    warnCities.append(pCity)

File: CyUtil.py Line: 352
Code:
def pyPrint(stuff):
	# < Revolution Mod Start >
	# Attempt to silence encoding errors for some city names after Python reload
	stuff = 'PY:' + convertToStr(stuff) + "\n"
	# < Revolution Mod End >
	sys.stdout.write(stuff)

File: CyUtil.py Line:306
Code:
def convertToUnicode(s):
	"if the string is non unicode, convert it to unicode by decoding it using 8859-1, latin_1"
	if (isinstance(s, str)):
		return s.decode("latin-1")
	return s

def convertToStr(s):
	"if the string is unicode, convert it to str by encoding it using 8859-1, latin_1"
	if (isinstance(s, unicode)):
		return s.encode("latin-1")
	return s

To resolve this issue, I simply change the code into:

Code:
def convertToUnicode(s):
	"if the string is non unicode, convert it to unicode by decoding it using 8859-1, latin_1"
	if (isinstance(s, str)):
		return s.decode("utf-8")
	return s
	
def convertToStr(s):
	"if the string is unicode, convert it to str by encoding it using 8859-1, latin_1"
	if (isinstance(s, unicode)):
		return s.encode("utf-8")
	return s

I'm afraid that somewhere will use the string outputed by these two functions and encoding/decoding it again without these two functions. But at least for now, I played the game for about 50 turns, there is no any error.

Maybe it only happens under my Chinese language operation system or under other Asian languages. I think in the previous game before change the code, I had not encountered these errors just because the lucky. ( there is not those city names or civilizations that can not be encoded. )
 
The Assimilation option isn't working...

Assimilation should allow me to build enemy UU's and UB's in the cities I captured from it as long as the option is on, and yet as Rome I took large parts of Egypt and can build regular Chariots(in the cities I took from Egypt), but not War Chariots.

hm, mate I think the OP dl is not updated with the cvdll which enables assimilation...

you can find it here:

http://forums.civfanatics.com/showthread.php?t=344528&page=9

it´s not savecompatible and you will have to restart..:(
 
Three things:

#1
Strategyguy, No excuse, just apologies for over-expressing and overreacting. Like Afforess said you are very helpful so don't forget that and don't get discouraged. Just am happy you figured it is more to do with hardware now...

#2
Glad there are new players who know about C++... Wow, with all these new ideas cropping up, I foresee great things... :D

#3
Yeah, I'm getting these Database errors since i got back to Internet here... Was afraid it had to do with my university, glad I'm not alone!
 
is anyone else getting a lot of database errors today? The forums seem glitchy on my end.

Like before what i said, but come to think of it my ISP has been acting funny also, on then off, low frequency, etc, all day and still, i wonder if Homeland Security took off today, and only had a few people monitoring the broadband that lowered everyone's ISP's (conspiracy theory) :joke:
 
That conspiracy theory might actually work if the whole world was American. Fortunately, it isn't :)
 
Yeah, Only the Government Civics are more balanced. It's a sign of positive progress that you like Monarchy now too. Fascism could be useful in a prolonged late game war, I suppose. Still needs work though.

Indeed. I think that civics issue is one of the most important problem for our consideration. Actually, lately I came up to conclusion that we only have two ways of effective action in this area:

1. Keep the original historic and realistic civics and concede to the fact that civics would stay unbalanced forever. If we want the RoM/AND to mirror the history of human mankind we HAVE TO agree that monarchy is better than despotism, republic better than monarchy, and so on. We KNOW that free market, liberal, free speach, free religion works the best, because people from Zimbabwe try to get to Western Europe and not the other way. Having this in mind, can we expect from players to choose another civics? Our goal of increasing the number of reasonable combination as it comes to civics DOES NOT come along with the reality.

2. Invent a complete new civic system (maybe not as complex and complicated as your departments system - keeping all tha admiration for your concept) which would be neither historic nor real. Getting rid of the historic and realistic background would give us freedom to grant bonuses and weaknesses and create a more balanced and varied system of managment.

I think I will try to present some ideas soon. I'm not saying I would find a Holy Graal but I hope that a new/fresh approach to civics would give us at least inspiration for further debate.

Revolutions makes it so certain leaders win and certain lose. Organized and Financial leaders seem to do better, as they avoid Financial instability better.

Are you suggesting that traits need some tweaking as well? Or just stating the facts as they are?

Hmm, I may need to look into that. GP are not balanced at all in AND.

I personally think that increasing the frequency of GP being born is the only way to bring their initial power back. Couple months ago I suggested an idea of Super Great People which could bulb two techs and be able to start a GA alone. My idea is that there should be around 20% possibility that GP would be born as a SGP.

I also think that Wonders which give you one tech (i.e. Oracle) should give you two techs.[/QUOTE]
 
Back
Top Bottom