We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
90 stars 37 forks source link

AssertFailed for AI during mid game #914

Open johan-buret opened 1 year ago

johan-buret commented 1 year ago

Assert Failed

File: DLLSources.\CvCityAI.cpp Line: 302 Func: CvCityAI::AI_assignWorkingPlots Expression: false Message: AI plot assignment confusion. Unit: Farmer (Master Tanner) in city: Novo Arkhangelsk could not be assigned to a job!

Here is the save that triggers it

AutoSave_AD-1609.zip

devolution79 commented 1 year ago

Yeah, this triggers in almost all my autoplays after the mid-game ish. I suspect it is because there are too many potential citizens and too few jobs (slots/plots). Not too long ago I added the additional details (unit/profession and city) to make it easier to track down what is going on. I think we need to add more code instrumentation to determine the number of available jobs and whether or not they are blocked by something else (plots could be occupied by enemies etc.). Also, it is possible that it all boils down to not terminating the job assignment process once we determine that we cannot employ any more colonists! In summary: This assertion is likely harmless so the only likely "bug" here is that we waste unnecessary cycles trying to assign colonists that cannot possibly be employed.