understanding debug errors and breaks

keldath

LivE LonG AnD PrOsPeR
Joined
Dec 20, 2005
Messages
7,578
Location
israel
hey guys,

im currently doing debugs for my mod,

i activated it using a debug dll and asafs guide.

when i get an error in the game, and debug it in vs 2012,

i dont understand what to do with the errors,

can some direct me how to translate an error in the vs debug to my actual game files?

for instance = i get this error:
> CvGameCoreDLL.dll!CvTeam::changeImprovementYieldChange(ImprovementTypes eIndex1=11, YieldTypes eIndex2=YIELD_COMMERCE, int iChange=-1) Line 5823 + 0x44 bytes C++
?
where does it go? what does it mean? that it does not allow a -1 one? but where - i didnt see something like that in the xml....


of this error:

> CvGameCoreDLL.dll!CvPlayer::getBuildingClassCount(BuildingClassTypes eIndex=-1) Line 12871 + 0x39 bytes C++


this on i havent got the slightest idea.

or this:

> CvGameCoreDLL.dll!CvUnitAI::AI_paradrop(int iRange=0) Line 14650 + 0x36 bytes C++

whats the paratrop means?
 
Really short answer: you don't have to understand this somewhat complex output. You have a setup issue.

CvGameCoreDLL.dll!CvUnitAI::AI_paradrop(int iRange=0) Line 14650 + 0x36 bytes C++

whats the paratrop means?
This is something, which is inside the function CvUnitAI::AI_paradrop, which is declared on line 14650 in CvUnitAI.cpp (filename isn't there, but I assume it's that file ;)) and the code in question is instruction number 0x36 from the function declaration. This isn't really useful because it doesn't say what C++ code is at 0x36 or even what instruction it is.

What it was supposed to do is to open the file in question and place a marker on the C++ line where the break is. Usually problems like this is failure to locate CvGameCoreDLL.pdb, which were generated together with the debug DLL. Also I don't know if the problem could be caused by not adding the files to the project.

My experience tells me that if I compile the DLL myself, the debug symbols just work and because of that I always compile my own debug DLL files and I don't really see the point in distributing debug DLL files. If people have a debugger, they have a compiler and can make their own debug builds. Distributing assert DLLs on the other hand could be quite handy for play testing (same as release, but with assert checks).
 
for instance = i get this error:
> CvGameCoreDLL.dll!CvTeam::changeImprovementYieldChange(ImprovementTypes eIndex1=11, YieldTypes eIndex2=YIELD_COMMERCE, int iChange=-1) Line 5823 + 0x44 bytes C++
?
where does it go? what does it mean? that it does not allow a -1 one? but where - i didnt see something like that in the xml....


of this error:

> CvGameCoreDLL.dll!CvPlayer::getBuildingClassCount(BuildingClassTypes eIndex=-1) Line 12871 + 0x39 bytes C++


this on i havent got the slightest idea.

or this:

> CvGameCoreDLL.dll!CvUnitAI::AI_paradrop(int iRange=0) Line 14650 + 0x36 bytes C++

whats the paratrop means?

None of those things is the actual error, it is just telling you where the error happened. In these cases for some reason it is telling you the function where the error happened (and the arguments that were used to call the function) instead of the actual line of code where the error was. There ought to be another line of output for each of those that says what the error actually is.

If you have a .pdb file in the folder where the debug DLL was made try putting it in the assets folder with the DLL so it can find it (this file is basically used to match the binary code in the DLL to the line of code in the .cpp/.h file that it corresponds to, and match memory locations to variables, and things like that).
 
Back
Top Bottom