Single Player bugs and crashes - After the 24th of February 2014

Fine then I can no longer work on this mod because it wont allow modules.

Why now? as i said with the debug dll that was never valid that has nothing to do with recent changes. I just made a small change so that everybody could see those errors.
It's like that since a few years but nobody ever cared about it they where always just adding more and more stuff. The whole xml loading code is a mess it makes me:eek::crazyeye::mad: why do you think Koshling wrote this about it.
CvXMLLoadUtility.* and especially CvXMLLoadUtilityModTools.cpp and CvXMLLoadUtilitySetMod.cpp

However, it's not (IMO anyway) very 'obvious' code, so this comes with a 'here be dragons' warning.

If the AndDependencyTypes tag would be working as it should this problem would also not exist but it looks like whoever put that tag in did not really think about it.

So... the problem is:

that you can't set an AndDependancy on the building class info right? That should be fixable. Not sure why you can't either given that it's a CvInfoBase tag that should thus apply to any and all game object types.

Even in the schema:
Code:
	<ElementType name="BuildingClassInfo" content="eltOnly">
		<element type="Type"/>
<!-- XMLCOPY				02/20/2008			MRGENIE		-->
		<element type="bForceOverwrite" minOccurs="0"/>
		<element type="bForceDelete" minOccurs="0"/>
		<element type="iForceInsertLocation" minOccurs="0"/>
		<element type="bTypeDependency" minOccurs="0"/>
		<element type="AndDependencyTypes" minOccurs="0"/>
		<element type="OrDependencyTypes" minOccurs="0"/>
It shows them as available on BuildingClassInfos.

So perhaps I'm not understanding what the problem is here?

The problem is that in that case the AndDependencyTypes tag isn't working and never was. If you add a Dependency to a Building in a BuildingClass it is always failing because Buildings are loaded after BuildingClasses.
 
So perhaps I'm not understanding what the problem is here?

You define both the Building Class and Building Infos for a building. So far so good.

You define an and dependency on the building. This should turn the building off if the dependency is not there but leave it on if it is. (There may be multiple and all are needed.)

However if the building is turned off only the Building Infos is turned off and you then get an XML error saying that you have a Building Class without a Building Infos.

This means that you can't have dependencies because you will always get errors if the dependent building is not there.

Obviously there is something in the processing of units which is not in the processing of buildings.
 
Why now? as i said with the debug dll that was never valid that has nothing to do with recent changes. I just made a small change so that everybody could see those errors.

The problem is that in that case the AndDependencyTypes tag isn't working and never was. If you add a Dependency to a Building in a BuildingClass it is always failing because Buildings are loaded after BuildingClasses.

Suddenly things that were working fine are causing errors. If it causes errors then people will complain.
 
You define both the Building Class and Building Infos for a building. So far so good.

You define an and dependency on the building. This should turn the building off if the dependency is not there but leave it on if it is. (There may be multiple and all are needed.)

However if the building is turned off only the Building Infos is turned off and you then get an XML error saying that you have a Building Class without a Building Infos.

This means that you can't have dependencies because you will always get errors if the dependent building is not there.

Obviously there is something in the processing of units which is not in the processing of buildings.
Ok, ok... so if I'm following the both of you... Alberts explains well what's happening here in a way I understand:
The problem is that in that case the AndDependencyTypes tag isn't working and never was. If you add a Dependency to a Building in a BuildingClass it is always failing because Buildings are loaded after BuildingClasses.
Some load orders HAVE changed and may be causing some unforseen issues that I don't know how easily they'd be sorted out. However, I believe it's always been necessary to have the class load after the building class. I'm not sure of that 100% though.

So you're trying to base the dependency of the building class on the existence of a building and that WILL fail. BUT if you can base it on something else... it can even be a dummy something else in the module that you're dependent on, if the problem is as Alberts explains it then it should work provided that the dependency would be or not be loaded before the building class infos is loaded. The load order is:
Code:
/Civ4BasicInfos/ConceptInfos/ConceptInfo
/Civ4NewConceptInfos/NewConceptInfos/NewConceptInfo
/Civ4DCMConceptInfos/DCMConceptInfos/DCMConceptInfo
/Civ4ANDConceptInfos/ANDConceptInfos/ANDConceptInfo
/Civ4CityTabInfos/CityTabInfos/CityTabInfo
/Civ4CalendarInfos/CalendarInfos/CalendarInfo
/Civ4SeasonInfos/SeasonInfos/SeasonInfo
/Civ4MonthInfos/MonthInfos/MonthInfo
/Civ4DenialInfos/DenialInfos/DenialInfo
/Civ4InvisibleInfos/InvisibleInfos/InvisibleInfo
/Civ4DomainInfos/DomainInfos/DomainInfo

	GC.registerUnitAIs();
	GC.registerAIScales();
	GC.registerGameObjects();
	GC.registerGOMs();
	GC.registerRelations();
	GC.registerAttributes();
	GC.registerTags();
	GC.registerPropertySources();
	GC.registerPropertyInteractions();
	GC.registerPropertyPropagators();

/CIV4UnitAIInfos/UnitAIInfos/UnitAIInfo
/Civ4AttitudeInfos/AttitudeInfos/AttitudeInfo
/Civ4MemoryInfos/MemoryInfos/MemoryInfo

/Civ4MapInfos/MapInfos/MapInfo
/Civ4MapSwitchInfos/MapSwitchInfos/MapSwitchInfo
	GC.updateMaps();
/Civ4GameSpeedInfo/GameSpeedInfos/GameSpeedInfo
/Civ4GameOptionInfos/GameOptionInfos/GameOptionInfo
/Civ4ColorVals/ColorVals/ColorVal
/Civ4TurnTimerInfo/TurnTimerInfos/TurnTimerInfo
/Civ4WorldInfo/WorldInfos/WorldInfo
/Civ4ClimateInfo/ClimateInfos/ClimateInfo
/Civ4SeaLevelInfo/SeaLevelInfos/SeaLevelInfo
/Civ4AdvisorInfos/AdvisorInfos/AdvisorInfo
/Civ4TerrainInfos/TerrainInfos/TerrainInfo
/Civ4YieldInfos/YieldInfos/YieldInfo
/Civ4CommerceInfo/CommerceInfos/CommerceInfo
/Civ4EraInfos/EraInfos/EraInfo

/Civ4AnimationInfos/AnimationCategories/AnimationCategory
/Civ4AnimationPathInfos/AnimationPaths/AnimationPath
/Civ4CursorInfo/CursorInfos/CursorInfo
/Civ4CivicOptionInfos/CivicOptionInfos/CivicOptionInfo
/Civ4UpkeepInfo/UpkeepInfos/UpkeepInfo
/Civ4CultureLevelInfo/CultureLevelInfos/CultureLevelInfo
/Civ4BonusClassInfos/BonusClassInfos/BonusClassInfo
/Civ4VictoryInfo/VictoryInfos/VictoryInfo

/Civ4EffectInfos/EffectInfos/EffectInfo
/Civ4EntityEventInfos/EntityEventInfos/EntityEventInfo
/Civ4CulturalAgeInfos/CulturalAgeInfos/CulturalAgeInfo
/Civ4PropertyInfos/PropertyInfos/PropertyInfo
/Civ4UnitClassInfos/UnitClassInfos/UnitClassInfo
/Civ4SpecialistInfos/SpecialistInfos/SpecialistInfo
/Civ4VoteSourceInfos/VoteSourceInfos/VoteSourceInfo
/Civ4TechInfos/TechInfos/TechInfo
/Civ4FeatureInfos/FeatureInfos/FeatureInfo
/Civ4ReligionInfo/ReligionInfos/ReligionInfo

	ArrangeTGA(GC.getReligionInfos(), "CIV4ReligionInfo");
	
/Civ4BonusInfos/BonusInfos/BonusInfo
/Civ4SpecialUnitInfos/SpecialUnitInfos/SpecialUnitInfo
/Civ4UnitCombatInfos/UnitCombatInfos/UnitCombatInfo
/Civ4PromotionLineInfos/PromotionLineInfos/PromotionLineInfo
/Civ4PromotionInfos/PromotionInfos/PromotionInfo
/Civ4GoodyInfo/GoodyInfos/GoodyInfo
/Civ4HandicapInfo/HandicapInfos/HandicapInfo
/Civ4RouteInfos/RouteInfos/RouteInfo
/Civ4ImprovementInfos/ImprovementInfos/ImprovementInfo
/Civ4TraitInfos/TraitInfos/TraitInfo
/Civ4BuildingClassInfos/BuildingClassInfos/BuildingClassInfo
/Civ4HurryInfo/HurryInfos/HurryInfo
/Civ4CorporationInfo/CorporationInfos/CorporationInfo"

	ArrangeTGA(GC.getCorporationInfos(), "CIV4CorporationInfo");
	
/Civ4SpecialBuildingInfos/SpecialBuildingInfos/SpecialBuildingInfo
/Civ4BuildingInfos/BuildingInfos/BuildingInfo
/Civ4CivicInfos/CivicInfos/CivicInfo
/Civ4LeaderHeadInfos/LeaderHeadInfos/LeaderHeadInfo
/Civ4PlayerColorInfos/PlayerColorInfos/PlayerColorInfo
/Civ4BuildInfos/BuildInfos/BuildInfo
/Civ4OutcomeInfos/OutcomeInfos/OutcomeInfo
/Civ4MissionInfos/MissionInfos/MissionInfo
/Civ4UnitInfos/UnitInfos/UnitInfo
/Civ4UnitArtStyleTypeInfos/UnitArtStyleTypeInfos/UnitArtStyleTypeInfo
/Civ4CivilizationInfos/CivilizationInfos/CivilizationInfo
/Civ4ProjectInfo/ProjectInfos/ProjectInfo
/Civ4SpawnInfos/SpawnInfos/SpawnInfo
/Civ4CivNameInfos/CivNameInfos/CivNameInfo
/Civ4Hints/HintInfos/HintInfo
/Civ4MainMenus/MainMenus/MainMenu
/Civ4SlideShowInfos/SlideShowInfos/SlideShowInfo
/Civ4SlideShowRandomInfos/SlideShowRandomInfos/SlideShowRandomInfo
/Civ4WorldPickerInfos/WorldPickerInfos/WorldPickerInfo
/Civ4SpaceShipInfos/SpaceShipInfos/SpaceShipInfo
/Civ4MPOptionInfos/MPOptionInfos/MPOptionInfo
/Civ4ForceControlInfos/ForceControlInfos/ForceControlInfo
/Civ4EventInfos/EventInfos/EventInfo
/Civ4EventTriggerInfos/EventTriggerInfos/EventTriggerInfo

	AddTGABogus(GC.getCorporationInfos(), "CIV4CorporationInfo");
	AddTGABogus(GC.getReligionInfos(), "CIV4ReligionInfo");

	
/Civ4ThroneRoomCameraInfos/ThroneRoomCameraInfos/ThroneRoomCamera
/Civ4ThroneRoomInfos/ThroneRoomInfos/ThroneRoomInfo
/Civ4ThroneRoomStyleInfos/ThroneRoomStyleInfos/ThroneRoomStyleInfo

	UpdateProgressCB("Global Events");
	UpdateProgressCB("Global Routes");

/Civ4RouteModelInfos/RouteModelInfos/RouteModelInfo

	UpdateProgressCB("Global Rivers");

/Civ4RiverInfos/RiverInfos/RiverInfo
/Civ4RiverModelInfos/RiverModelInfos/RiverModelInfo

	UpdateProgressCB("Global Other");

/Civ4WaterPlaneInfos/WaterPlaneInfos/WaterPlaneInfo
/Civ4TerrainPlaneInfos/TerrainPlaneInfos/TerrainPlaneInfo
/Civ4CameraOverlayInfos/CameraOverlayInfos/CameraOverlayInfo

	UpdateProgressCB("Global Process");

/Civ4ProcessInfo/ProcessInfos/ProcessInfo

	UpdateProgressCB("Global Emphasize");

/Civ4EmphasizeInfo/EmphasizeInfos/EmphasizeInfo

	UpdateProgressCB("Global Other");

/Civ4ControlInfos/ControlInfos/ControlInfo
/Civ4CommandInfos/CommandInfos/CommandInfo
/Civ4AutomateInfos/AutomateInfos/AutomateInfo

	UpdateProgressCB("Global Vote");

/Civ4VoteInfo/VoteInfos/VoteInfo

	UpdateProgressCB("Global Interface");

/Civ4CameraInfos/CameraInfos/CameraInfo
/Civ4InterfaceModeInfos/InterfaceModeInfos/InterfaceModeInfo
/UnitFormations/UnitFormation
/Civ4AttachableInfos/AttachableInfos/AttachableInfo
/Civ4DiplomacyInfos/DiplomacyInfos/DiplomacyInfo
/Civ4QuestInfos/QuestInfo/Civ4TutorialInfos/TutorialInfo
/Civ4EspionageMissionInfo/EspionageMissionInfos/EspionageMissionInfo
so if you make the dependency base on anything BEFORE buildingclassinfos is loaded it should theoretically work.
 
here is the save game file with the scout droid experience bug. it gets no experience but the previous upgrade gets experience which carries over. built from new the scout droid gets nothing and has no buttos to upgrade even when the previous upgrade robot has leftover experience.

the scout droids are in thebes or just to the left of thebes. the only upgrades they get are from building which give specific upgrades.

ggm
 

Attachments

  • bug3.zip
    bug3.zip
    4.6 MB · Views: 42
  • pic.jpg
    pic.jpg
    484.1 KB · Views: 47
so if you make the dependency base on anything BEFORE buildingclassinfos is loaded it should theoretically work.

It has always worked fine until we started getting these XML errors. the building was not available when any building it was dependent on was not available.

Note: this problem is only for compatibility across modules. In this case you can't have the tamer if the mega fauna wonder is not in the game. This is the dependency I wanted between those two different modules.
 
Fine then I can no longer work on this mod because it wont allow modules.

Why do you ALWAYs threaten this?? People that read that might get the wrong impression then??:(
nvrdmd i will hold my tongue on this. . .
 
It has always worked fine until we started getting these XML errors. the building was not available when any building it was dependent on was not available.

Note: this problem is only for compatibility across modules. In this case you can't have the tamer if the mega fauna wonder is not in the game. This is the dependency I wanted between those two different modules.

Well... I do understand that and your frustration. I've provided a possible way to work around it and yes it does seem to be more than what 'should' be.

It would take going back to look at the way the ROM or our very early dll would've handled that kind of special case to see if there was some kind of direct workaround provided that isn't now since AIAndy, n47 etc... Alberts did exactly what you wanted him to do so please don't get frustrated with him. He's made it so that xml errors will show properly. And it IS an error to have a reference to a gameobject that doesn't exist in the fileset unless the referring gameobject is also disabled. That's a generic truth throughout the whole structure. The AndDependency should work on a BuildingClass provided you don't make it dependent on a building existing or not.

Out of curiosity, the Building that class is calling that is edited out in this situation by an AndDependency... what dependency is being used that makes that building disabled? If it's another building, perhaps having the building class of THAT building be the dependency for the building class that you're having trouble with might work.
 
here is the save game file with the scout droid experience bug. it gets no experience but the previous upgrade gets experience which carries over. built from new the scout droid gets nothing and has no buttos to upgrade even when the previous upgrade robot has leftover experience.

the scout droids are in thebes or just to the left of thebes. the only upgrades they get are from building which give specific upgrades.

ggm

Oh my GAWD that was a hard bug to find!!!

Found it though ;) Reminded me I needed to restructure some old code that was somewhat outdated anyhow. You must've started this game ages ago! The only way (I believe) this unit wouldn't have been able to promote was if you started the game before some major Fight or Flight implementation points. Anyhow, the next commit should fix the problem :D
 
What the heck is going on, after the latest SVN the dll went from a normal 30 seconds turn times, to OVER 4 - 5 minutes each turn now :mad::mad: Everything was fine.

Something has to be fixed soon!!!!!!!

Have you reversed the last dll update and replayed the same rounds afterwards?

I cannot believe that my last update would've caused any delays as it changes nothing about any major processing. It does adjust how Commanders are created a bit. And that's it.

The fix to 'sign' processing by DH recently has a greater chance of causing delay than the very minor adjustments I made. (Not trying to blame him either.)

It's possible you're just running into a few rounds that are processing more in the AI I suppose. Civic and/or Tech evals can be quite heavy and do not always need to be run every round.

The other vague possibility, though I really don't think this is it either, is that my compiler version may not compile as fast. My reason for thinking this can't be it is due to the fact that the dll before this one was mine as well. So... ???


Alberts... I changed very little but can YOU see anything that might explain a major increase in turn times???

EDIT: Could I have oopsed and updated the core dll with a debug dll? Would be fixed in a moment anyhow if so...
 
Now i get this CTD also

That one comes from an interesting quirk in your handicap settings combined with some not so prepared to handle a 0 value on iAITrainPercent coding Koshling had put in place. You may want to review why you have a value of 0 on an iAITrainPercent tag somewhere as that may be causing other issues. I'm fixing the coding so that it has a way to keep this from ever happening.


I played your save a few rounds and while I could NOT figure out how in the hell that wolf ended up so strong (not even a theory! It's Size Matters unitcombats are all correct so I really don't know what happened there but I suspect the python may be doing something odd there when it generates the unit... I dunno. Will take more investigation and catching it while its being born - the lion that's born that round doesn't have the problem so ???) But the turn times didn't seem nearly so long as you claimed so I'm thinking I might've just put a debug dll where it shouldn't have been.

That'll be fixed as soon as my system finishes recompiling the fix for this issue.
 
That one comes from an interesting quirk in your handicap settings combined with some not so prepared to handle a 0 value on iAITrainPercent coding Koshling had put in place. You may want to review why you have a value of 0 on an iAITrainPercent tag somewhere as that may be causing other issues. I'm fixing the coding so that it has a way to keep this from ever happening.


I played your save a few rounds and while I could NOT figure out how in the hell that wolf ended up so strong (not even a theory! It's Size Matters unitcombats are all correct so I really don't know what happened there but I suspect the python may be doing something odd there when it generates the unit... I dunno. Will take more investigation and catching it while its being born - the lion that's born that round doesn't have the problem so ???) But the turn times didn't seem nearly so long as you claimed so I'm thinking I might've just put a debug dll where it shouldn't have been.

That'll be fixed as soon as my system finishes recompiling the fix for this issue.

Yeah, i forgot i put in my handicap system, but i didnt know about the 0 factor??

I just looked and the iAItrainpercent never goes below 50??
 
Interesting... maybe there's a modifier to it somewhere I dunno... the value being divided by 0 was:
x / iAItrainpercent * iAItrainpercent

so logically an iAItrainpercent must've been set to 0 somewhere I figured. It would be a rare hit too since it's involved in war planning.
 
Suddenly things that were working fine are causing errors. If it causes errors then people will complain.

I only made those errors visible in the release dll nothing else. It looks like nobody used the debug dll to check for such errors and that is the reason everybody thought things where working fine.
 
Rev 7619 + files DH postes as zip yesterday in SVN thread

European cavaran is a red blob.

Also, my automated workers are still switching between building fort/mine, fort/pasture etc on resource plots within city working area. I thought that maybe the city is not working the tile when the decision is made to build a fort but that does not seem to be the case.
 
Hello there,

I have a problem with my current v34 game, i have two rebel civilizations that i have killed ( They don´thave any city or unit) but they are still on the game annoying me because of war weariness. Is there any way of get rid of them?. Thanks in advance.
 
Back
Top Bottom