[Religion and Revolution]: Bugs and Todos

Ok, but this leads to an error, when I start the game (the game, not the mod). I could not make a screenshot, but it seems to be something with the faiweather script.

That is normal and not related to our mod.
If you start the mod directly you should not get that bug.

What should happen, if it works normal? What are "Python Exceptions"?

It should tell you by Pop-Up, if there is an Exception the Python-Code runs into.

I cannot use units inside city buildings. Every time, if I place a unit in a building to produce something (every building, every unit), the game totally freezes.

In the savegame I tried to use the prayer or the fisherman inside the city to produce hammer, but the game freezes.

Strange. :confused:
(I just tested with fresh games and did not have that problem.)

Could you please do the following:

1. Clean up your cashes.
2. Start the mod directly.
3. Start a new game and try again.

I will take a look at your savegame. :thumbsup:

Edit:

I just loaded your save, put different Colonists into the building and did not get any freeze. :dunno:
 
@team:

Currently Schmiddie has the problem, that the game freezes, when he tries to assign a Colonist to a profession within a building. :(

Does anybody else also have that problem ?
(... because I don't have it.)

@Schmiddie:

Do you also get that problem, when you play with a smaller mapsize ?
(Maybe you have used Mapsize Gigantic in all of your tests. :think:)
 
I have this problem with all mapsizes, all kinds of different maps (new world, fairweather etc.), all playable nations or other things you can adjust before you start a game.

But after my complete new installation of the vanilla game and the mods it does no longer freeze but produces a crash to desktop...
 
@team:

Please everybody let me know, if you have this problem or not. :thumbsup:

Schmiddie and I have tried almost everything yesterday to solve this for him, but without success. :(
(As I said, I personally do not have that problem at all.)

We have tried:

  • Cleaned cashes
  • Reinstalled colonization
  • Checked out a clean repsitory
  • Used SNV-Export to get a clean copy of the mod
  • Moved the mod from .../My Games/Mods to .../colonization/Mods
  • Tried all different settings (Mapsize, Nation, ...)
  • Recompiled the DLL
    ...

Nothing has helped so far. :confused:
 
Thats too bad :confused: I don't encounter that problem either, when I run it the Professions including the MYP ones seem to be working nicely. I don't know what could cause it, but the only other thing I can think of is to turn on error logging and dumpfiles in Civ4config , then upload the dump and log files so maybe Ray could see what caused the crash.
 
I don't encounter that problem either, when I run it the Professions including the MYP ones seem to be working nicely.

Thanks. :thumbsup:
That is valuable information.

Chances are high then, that the problem is not related directly to the mod. :think:

@orlanth:
I have 2 questions:
1. You have tested with the current revision, right ? (Just to be sure.)
2. What Operating System do you use ?

I don't know what could cause it, but the only other thing I can think of is to turn on error logging and dumpfiles in Civ4config , then upload the dump and log files so maybe Ray could see what caused the crash.

Yes, maybe dump and logs may help.

Usually I am able to solve a problem, if I can reproduce it on my own system.
(Might become pretty difficult if I cannot reproduce it ... :dunno:)
 
This is the python error I get, when my game crashes:

"Traceback (most recent call last):

File "CvScreensInterface", line 578, in forceScreenRedraw

File "CvMainInterface", line 1295, in redraw

File "CvMainInterface", line 2499, in updateCityScreen

File "CvMainInterface", line 1787, in updateSelectionButtons

RuntimeError: unidentifiable C++ exception
ERR: Python function forceScreenRedraw failed, module CvScreensInterface

Maybe someone can understand whats wrong with my version/game...?

And maybe the logs can help? I'am currently stumped and have no idea what else I could do...
 
@Schmiddie:

I have found the following error:

...\XML\Buildings\CIV4CityLSystem.xml (1 hits)
Line 1298: <Attribute Class="ArtStyle">ARTSTYLE_DENMARKE</Attribute>

ARTSTYLE_DENMARKE
(The "E" at the end is wrong.)

-------------

Bugfix is uploaded to SVN.

Please try and let me know if that has solved your problem. :thumbsup:
(Please clean caches before and start a new game.)

If that does not help, I will do a deeper analysis starting from the Python-Exception.

-------------

Edit:

I have found more errors (related to XML) but most of them should not be critical.
(Of course they will be fixed.)
 
@Schmiddie:

I have checked the Python error you posted.
(I have marked the line that throws the error in red.)

Spoiler :

Code:
for i in range (gc.getNumUnitClassInfos()):
				eLoopUnit = gc.getCivilizationInfo(pHeadSelectedCity.getCivilizationType()).getCivilizationUnits(i)
				if (eLoopUnit != UnitTypes.NO_UNIT):
					if (pHeadSelectedCity.canTrain(eLoopUnit, False, True)):
						szButton = gc.getPlayer(pHeadSelectedCity.getOwner()).getUnitButton(eLoopUnit)
						[COLOR="Red"]screen.appendMultiListButton("CityBuildingSelectionMultiList", szButton, iRow, WidgetTypes.WIDGET_TRAIN, i, -1, False)[/COLOR]
						if ( not pHeadSelectedCity.canTrain(eLoopUnit, False, False) ):
							screen.disableMultiListButton("CityBuildingSelectionMultiList", iRow, iCount, szButton)
						elif pHeadSelectedCity.getUnitProduction(eLoopUnit) > 0:
							bUnitTypeInQueue = false
							for i in range(CyInterface().getNumOrdersQueued()):
								if (CyInterface().getOrderNodeType(i)  == OrderTypes.ORDER_TRAIN):
									if CyInterface().getOrderNodeData1(i) == eLoopUnit:
										bUnitTypeInQueue = true
										break
							if not bUnitTypeInQueue:
								screen.enableMultiListPulse("CityBuildingSelectionMultiList", true, iRow, iCount)
												
						iCount += 1
						bFound = True


It seems as if there is some bug with the UnitGraphics or UnitArtStyles.

We probably need to check the XML.
(Units, UnitArtStyles, UnitArtDefines)
 
The bug still exists, but the python errors have decreased. There are only 3 now... we come along with that... :)

Could you check the button you created ?
 
@Robert and orlanth:

Could the two of you please also activate error logging and attach your logs (as zip) after you have played a few rounds ?
(This will help me find and fix XML-bugs.)

@Schmiddie:

Could you please try to check in XML all UnitArtStyles and UnitArtDefines we have added ?
(I know, it is a lot of work, but I think it may help.)

The easiest way is probably to do a Diff (with Notepad++) to the XML versions of TAC and check our new ones first.

Especially interesting is, if the paths to the files are correct.

-------------

Thanks. :thumbsup:
 
@Ray:

the OS on my pc is Windows 7 Home Premium, I will try to retest again with logs when I get a chance.

About those XML log errors you mentioned:
When it says "info type NONE not found", I think many those are caused when it looks in XML tags and finds the text NONE , when it was expecting to find a null tag or a value that was already declared.

For example in Civ4Leaderheadinfos.xml:
<NativeRaidAttitudeThreshold>NONE</NativeRaidAttitudeThreshold>
instead of
<NativeRaidAttitudeThreshold></NativeRaidAttitudeThreshold>
or
<NativeRaidAttitudeThreshold>ATTITUDE_FURIOUS</NativeRaidAttitudeThreshold>

However I think some of the XML tags may be intended to have the text NONE, since the vanilla game contains these.
eg in in Civ4Leaderheadinfos.xml:
<AlarmType>NONE</AlarmType>

For errors that say "info type not found", it may be that it found null inside a XML tag where it was expecting NONE or another non-null value.

For the new XML tags from TAC and RAR, I don't know which are expecting to have NONE for empty tags or not; maybe the DLL programming for reading those tags may need to be adjusted to be able to handle NONE or a null value. In any case I think these probably aren't fatal errors, since the mod has apparently run with them for some time without anyone noticing it, but it could still be worth trying to fix.


BTW I should definitely mention, if you haven't seen it yet, get this fantastic utility made by davidlallen for checking Civ4 mods for XML errors and missing XML tags. It can eliminate a lot of pain! :p:cool:

:king::king: http://forums.civfanatics.com/showthread.php?t=276286 :king::king:
 
Now when I download the new version and try to run it, there are a bunch of XML artstyle errors while loading and it crashes immediately. :(

I will check. :thumbsup:
(This evening.)

Did you clean your caches ?
Did you use SVN Export to get the complete new revision ?
 
@team:

I just did the following:

1. Got complete current revision with SVN Update and SVN Export.
2. I deleted the caches.
3. I started the mod.
4. I played a few rounds.

Result:
Everything worked perfect !
(No XML while loading errors, no Python Errors in log.)

I really believe, that it might have something to do with your caches.

Please do the following:
(After you got a fresh and complete current revision.)

In Windows explorer type:
%appdata%

This should bring you to the AppData directory.
(It should work with XP, too.)

Follow this path:
...\AppData\Local\My Games\Colonization\cache

Hard delete everything you find in there.

Then start the mod directly and play a few round.

After that, please tell me again, if you are having problems. :thumbsup:
 
Now it loads ok after having restarted my computer. I thought setting Civ4config to reload the files was enough to clear cache, but apparently not and they may need a restart or deleting of cache as ray mentioned.

btw did you get the civcheck utility and was it useful in finding any errors?
 
Now it loads ok after having restarted my computer.

Great. :)

I thought setting Civ4config to reload the files was enough to clear cache, but apparently not and they may need a restart or deleting of cache as ray mentioned.

It is my experience that it is sometimes not enough,
if a mod undergoes as many changes as Religion and Revolution currently does. :dunno:
Thus I always delete caches, when I am testing a new revision ...

btw did you get the civcheck utility and was it useful in finding any errors?

Not yet. :)
 
Top Bottom