Help! CTD without error message

Code:
Unhandled exception at 0x029da749 (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 
0xC00000FD: [B]Stack overflow[/B].

A stack overflow is usually a result of an infinite recursion. Meaning function A calls function B, which calls function C (etc.) and then calling function A inside it, and continuing this without ever quitting, until the space on the stack (the area in memory which holds all these calls) is over.

Do you use the Visual Studio debugger catch your crash (as was suggested by LyTning94 and Tholal)? If so - did you compile the dll yourself? if not, it won't be able to show you the source code. When you do - it will show you two important things: one - You'll see the exact line in which the crash happened and the variables values. two - you'll see the call stack, which is basically which function called which. If you'll see there something like (and I'm just making stuff up here):
Code:
AI_yieldValue(...)
AI_isEmphasizeCommerce(...)
AI_yieldValue(...)
AI_isEmphasizeCommerce(...)
AI_yieldValue(...)
AI_isEmphasizeCommerce(...)
AI_yieldValue(...)
AI_isEmphasizeCommerce(...)
AI_yieldValue(...)
AI_isEmphasizeCommerce(...)
...

Then you can see what the problem is.
You can double click any of these to see the calling code and its variables.
 
also i was getting a very strange assertion faillure. it was telling me, that a PROJECT_CURE_CANCER was not found and was referencing from the CIV4EspionageMissionInfo.xml - however there are noreferences to that project in this xml file, i didn't even modify it for my mod. its also not present in the custom assets folder. in fact i cannot find that project anywhere in the xml files. that is very strange. :confused:

You can often ignore the XML file reference if it is that particular file, and in particular if it mentions that file and you are well past the XML loading stage. The reason it keeps showing up after it stops being relevant is that this particular XML file just happens to be the last one that is loaded. Therefore when it shows you the contents of the variable that holds the "current" XML file name it just keeps saying "CIV4EspionageMissionInfo.xml" after it has stopped being useful (if you wanted to you could clear it, or set it to "none" or "irrelevant" or something like that, after the XML loading was all done).

Somewhere in your mod's Python you probably have something like:
gc.getInfoTypeForString("PROJECT_CURE_CANCER")
but you don't have a project with a matching name in the project XML file.
 
Well it's fixed :)

After finding out how to get Visual Studio to "load symbols" for the dll, it showed me the problem:
I had added a new attitude modifier to the AI. But I made it so, that it only came into effect if your attitude with the AI was lower than friendly. So it really called upon itself again and again to test that. After commenting out that part, everything works fine without crash.

Thanks everyone for your help! :)

@God-Emperor: Thanks for pointing that out. It may be possible this is the python remnant of some mod I merged into mine... ;)
 
I had added a new attitude modifier to the AI. But I made it so, that it only came into effect if your attitude with the AI was lower than friendly. So it really called upon itself again and again to test that.

That's interesting to hear. I did the exact same thing once and had the same problem.
 
Back
Top Bottom