Game Crash

Linkman226

#anarchy
Joined
Sep 14, 2007
Messages
2,493
I'm getting the following Assert Failed before my game crashes. Can someone help me out with what exactly it means?

Code:
Assert Failed

File:  CvCityAI.cpp
Line:  1522
Expression:  false
Message:  

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

The relevant section of code, line 1522 in red:

Code:
    else
    {
    	iMaxUnitSpending += bDefenseWar ? 4 : 0;
    	switch (pArea->getAreaAIType(getTeam()))
    	{
			case AREAAI_OFFENSIVE:
				iMaxUnitSpending += 5;
				break;

			case AREAAI_DEFENSIVE:
				iMaxUnitSpending += 10;
				break;

			case AREAAI_MASSING:
				iMaxUnitSpending += 25;
				break;

			case AREAAI_ASSAULT:
				iMaxUnitSpending += 8;
				break;

			case AREAAI_ASSAULT_MASSING:
				iMaxUnitSpending += 16;
				break;

			case AREAAI_ASSAULT_ASSIST:
				iMaxUnitSpending += 6;
				break;

			case AREAAI_NEUTRAL:
				break;
			default:
				[COLOR="Red"]FAssert(false);[/COLOR]
		}
	}
 
What do you mean by that?

EDIT: And I don't know how familiar you guys are with RFC, but there's two starts from the "Play Scenario" screen, one with a starting date of 3000 BC, and another with a starting date of 600 AD. The crash only happens on the 3000 BC start.
 
It means that there's an area that was not assigned an Area AI type for a specific team.
As for how it happened or what to do with it - :dunno:
 
I noticed it after I added a new civ. Could that have anything to do with it?
 
I noticed it after I added a new civ. Could that have anything to do with it?
Of course; just about anything can cause the game to crash. Always test every change you make to your mod, or you may never figure out what is causing an issue that is cropping up. Also, back-up your mod before making said changes. Because then you always have the option of reverting your changes and applying them correctly. The alternative, debugging and fixing a broken mod, is far inferior.

Now, I'm not at all technically versed, but I believe there is some sort of version control utility for logging/reverting your changes available. That sounds like a very good idea, even if I can't be bothered with learning new software myself. :lol:
 
Did you load an existing game /map/scenario after that? because that could cause it, I imagine.

Just the existing 3000 AD scenario that was already in place.

Of course; just about anything can cause the game to crash. Always test every change you make to your mod, or you may never figure out what is causing an issue that is cropping up. Also, back-up your mod before making said changes. Because then you always have the option of reverting your changes and applying them correctly. The alternative, debugging and fixing a broken mod, is far inferior.

Now, I'm not at all technically versed, but I believe there is some sort of version control utility for logging/reverting your changes available. That sounds like a very good idea, even if I can't be bothered with learning new software myself. :lol:

I have SVN version control for my mod, so I could go back and look I suppose.
 
Alright, so I went ahead and backtracked via SVN:

Revision 30- No crash
Revision 31- Had a python error that I had quickly fixed in revision 32, so I didn't check this revision. Skipped to revision 32:
Revision 32- Causes a crash.

So after some experimentation, I discovered the problem. For some reason, my ini file occasionally resets, converting the old ini file into a .bak. Normally I notice this cuz I have windowed mode on by default and when the ini resets it becomes full windowed. However this time, it DIDN'T change the window status, but DID change the python exceptions, so I wasn't getting the python exception before the crash, and thought I had python exceptions on b/c it was in windowed mode. Therefore I didn't think to go double check until now.

The error was a typo in the WBS file, hence why it was specific to only one WBS file.

ABU_BAKR was ABU_BAKL :mischief:

Thanks for all your help guys!
 
Top Bottom