Asaf
Sleep Deprived
- Joined
- Mar 22, 2010
- Messages
- 1,326
Try the link I gave you earlier (post #8).
If you have any questions - I'll try to answer.
If you have any questions - I'll try to answer.
@crashes: In most cases caused by missing artDefines entries. Can you compile a debug dll? Would probably help.
Since you are not a programmer, explaining the debugging process may be the wrong solution. Can you remove one change from your python, to make the crash stop? Then you know this change introduced the crash. Let's start from there rather than explaining the concept of debugging a C++ program.
Try the link I gave you earlier (post #8).
If you have any questions - I'll try to answer.
This project is out of date: CvGameCoreDLL. Would you like to rebuild?
This means you have made changes in the code since the last time you compiled. Generally speaking, you always want to answer yes to this question, and I think there should be an option to do so (a checkbox or something).
It is important that you make sure to copy the Debug DLL after you build it to the Mod folder, otherwise it will not be loaded.
(There is a way to do so automatically after you build the project, in the project properties -> post build events).
'A debugger has been detected. Unload the debugger and try again.
Now this is weird. This means that for some reason your copy of BTS protects itself from being debugged. I've never had this issue with BTS.
Which OS are you using? Do you use steam for BTS (not sure it's relevant, but maybe steam adds some protection)?
When you are debugging you need to also comy over that huge CvGameCore.pdb file as well as the debug dll itself.
That's the wierd thing, because I haven't made any changes since I compiled last. I also copied the debug DLL to Mods/Techs Add Commerce/Assets.
I am using Windows XP, and no I am not using steam.
Is it possible that I set something up wrong and the debugger is trying to deubug BtS itself and not my mod, and that is why it says the debug DLL is out of date, and also (maybe) that it blocks the debugger?
When you are debugging you need to also comy over that huge CvGameCore.pdb file as well as the debug dll itself.
bool CvInitCore::getOption(GameOptionTypes eIndex) const
{
FASSERT_BOUNDS(0, NUM_GAMEOPTION_TYPES, eIndex, "CvInitCore::getOption");
if ( checkBounds(eIndex, 0, NUM_GAMEOPTION_TYPES) )
{
return m_abOptions[eIndex];
}
else
{
return false;
}
}
EDIT: It also appears that, in my stupidity, I changed the value of eTech in the debugger. I didn't realize this would affect the code, I thought it would just change it for the duration of the debug. From what I can gather, it changes eTech at a certain point in CvGameTextMgr.cpp, but only for a certain time until it changes back. I know this because it adds +1 Trade Routes per City to my mouseover of the tech in the tech tree. How can I undo this?
Check CvEnums.h and CyEnumsInterface.cpp and ensure that the game options agree with GameOptionInfos.xml
When you edit the value in the debugger it changes the value in the specific place in memory. It will remain for the duration of the session or until the code itself changes this value.
You changed a value in the debugger during one session, then you exited that session. If you are seeing some different behavior in the game, it has nothing to do with that change in one debugger session. The different behavior must be due to some other file change you made, for example in the C++, or xml, or python.
Do you have python exceptions turned on? When a python call fails and python exceptions are off, it "looks like" nothing happened.
Add print statements at the places where you expect your function to be called. Perhaps it is getting part way through the functions you expect to be called. Knowing where the calling sequence stops, based on your print statements, at least narrows down the search.