Bug Reports

I have downloaded the last git files and when I try to found my first village I get the following failed assert:
Code:
File:  CvGlobals.cpp
Line:  3791
Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type AI_DIPLOCOMMENT_FOUND_FIRST_CITY not found, Current XML file is: xml\Units/CIV4FormationInfos.xml

And then no diplomacy screens work correctly, that is no text appears. The XML file is there, it is just not reading from it.
Edit: Oh I just noticed in the above error report, it is trying to read from CIV4FormationsInfos when it should be reading from CIV4DiplomacyInfos, something is astray.

I am currently working on the new Trade Screens stuff and I have made several changes so posting a saved game is out of the question at the moment, but this bug should happen to anyone. My changes had nothing to do with Diplomacy, but you just never know about these things:)
 
CIV4FormationsInfos is the last XML file to be read. This mean whenever there is a failure after XML files have been read, then it will report this file if CvGlobals::getInfoTypeForString() fails. I would to say that this is a minor bug in the error message.

Next bug discovered: Medieval_FaireWeather.py uses EUROPE_NORTH and is currently broken due to this.

AI_DIPLOCOMMENT_FOUND_FIRST_CITY:
I pushed a fix for this. When I wrote a script to gather XML load code into one function, I made it trigger on LoadGlobalClassInfo(). It turns out I missed
Code:
// Specail Case Diplomacy Info due to double vectored nature and appending of Responses
[B]LoadDiplomacyInfo[/B](GC.getDiplomacyInfo(), "CIV4DiplomacyInfos", "GameInfo", "Civ4DiplomacyInfos/DiplomacyInfos/DiplomacyInfo", &CvDLLUtilityIFaceBase::createDiplomacyInfoCacheObject);
In fact the very same thing happened when I wrote a script to add the length check meaning length of CIV4DiplomacyInfos wasn't checked. I fixed this as well. I also fixed the typo in the comment :lol:
 
Try to rebuild your solution (clean+build). Personally I commit before I pull because then I have something to go back to if the merge from github fails.

I try to clean but I get this:

Code:
1>------ Clean started: Project: Medieval_Tech, Configuration: Assert-fast Win32 ------
1>  'nmake' is not recognized as an internal or external command,
1>  operable program or batch file.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(33,5): error MSB3073: The command "set TARGET=Assert
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(33,5): error MSB3073: nmake clean" exited with code 9009.
========== Clean: 0 succeeded, 1 failed, 0 skipped ==========

I did rebuild the solution but the same crash when doing the XML check. Recently, this push and pull stuff has been a real pain for me. I keep having to just delete it all and make a new clone.... grrr:mad:

I also did commit my changes before I pulled but I got errors when I pulled, so I saved and stashed my changes and just tried to pull. It pulled finally and the mod seems all up to date, but still want run.

Edit: Well. hmm, I remember long time ago that the game would crash on start up at Check XML until I packed all my graphic files. So, I went and looked at graphics and found the one unit I was experimenting on still there. So I deleted it and the game started up finally. We'll see if that was the problem...
 
I ran into a bug.
CvGameTextMgr::parseCivicInfo() said:
FAssert(GC.getGameINLINE().getActivePlayer() != NO_PLAYER || !bPlayerContext);
if (bPlayerContext || !bCivilopediaText)
{
eCivilization = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivilizationType();
}
The problem is that the if can be true even when GC.getGameINLINE().getActivePlayer() is NO_PLAYER. There are no comments on origin or purpose of this line, but the if doesn't exist in vanilla, only the FAssert().

Preventing the bug from appearing is easy, but it modifies the behaviour of the function. Without knowing why it was added in the first place I have no way of knowing if that will break something.

Another issue. TXT_KEY_LEADER_KNUT_PEDIA inside MedTech_CIV4GameText.xml is ridiculously long. In fact it is so long that git can't handle it correctly and treats it as a binary file. We can only monitor changes in text files, not binary files meaning the log will only tell us when the file changes, not what changed inside it. It would be beneficial to figure out a way to make the lines shorter to avoid this problem.

I tried to shorten it and git accepted it as text when I added a newline after
I then pray, and also command, Earl Thurkil, if he can, to cause the evil-doer to do right.
This indicates that there is a 10k character limit for each line in git. The whole line is more than 12k characters long.

Who reads such a long text in a game anyway :confused:
 
I ran into a bug.

Those are my "if"s, generally when I mod a function extensively I pretty much claim it as mine and put my tags at the beginning and the end. I remember those pedia bugs may have began back when you made some kind of addition, not sure when. It's just another one of those issues relieved by your additions I believe.

TXT_KEY_LEADER_KNUT_PEDIA

I think Drjest added those file, in preparation for a new leader head. He, like me, loves history so I am one who would read all of it.
 
Those are my "if"s, generally when I mod a function extensively I pretty much claim it as mine and put my tags at the beginning and the end. I remember those pedia bugs may have began back when you made some kind of addition, not sure when. It's just another one of those issues relieved by your additions I believe.
That explains how it got there, but not what it is supposed to do. Clearly you had a reason to add code, which isn't in vanilla. If I restore vanilla code at that location we will get rid of the bug, but what ingame change will that have compared to what you planned?

I think Djpriest added those file, in preparation for a new leader head. He, like me, loves history so I am one who would read all of it.
I know you would like to read the info written there (me too). My point is more who would read that massive amount of text in a display engine totally not designed for that amount of text? If you copy it into a text editor and print it, it will use more than 3 pages. Remember this is without normal formatting like newlines. The amount of text here is massive and way more than pedia was designed for.
 
That explains how it got there, but not what it is supposed to do. Clearly you had a reason to add code, which isn't in vanilla. If I restore vanilla code at that location we will get rid of the bug, but what ingame change will that have compared to what you planned?

Well, as much code as I have added, and like I have said time and time again I never intended for anyone else to actually attempt to cypher my code so I left few notes. I don't have a clear recollection of this part. But, tomorrow I'll look into this and I bet I can figure out whats going on by looking at the call stack. This happens when looking at the pedia correct?
 
But, tomorrow I'll look into this and I bet I can figure out whats going on by looking at the call stack. This happens when looking at the pedia correct?
Yes. When I enter the pedia from main menu, getActivePlayer() returns NO_PLAYER. This happens when I switch to leader overview.

The question is not how to trigger it, but more why eCivilization needs to be changed. Caller sets it to 3, which is likely good enough.
 
Yes. When I enter the pedia from main menu, getActivePlayer() returns NO_PLAYER. This happens when I switch to leader overview.

The question is not how to trigger it, but more why eCivilization needs to be changed. Caller sets it to 3, which is likely good enough.

The problem was in parsing Civic info and because of how the Tech Screen displays Civic info. I needed the code to check if the player was active or not for the Tech Screen info. Anyway, I believe I have fixed this issue. Also, Civics screen was not appearing in the Pedia because of the move from last to first place in the Infos. I fixed this and pushed all changes to Git.
 
hmmmm...

Maybe I downloaded the latest version wrong, was it part of the master tree, or maybe I merged it wrong, but I still get this problem on the main menu pedia.. or perhaps it is a differnt bug, but it happens when clicking on leaders tab.

Also I think something has happened to the city screen, (unless I managed to mess this up too in the merge)

The screen shot is attached as a .rar

The resources bar has gone funny, it is all stretched and the numbers don't fit and wood appears to be missing!

What did I do!!! :D

Something has gone very wrong....

I think a treasure of about 1500 just arrived in my town, it disappeared without me pushing a 'sell' button and I now appear to have 3,025,210 gold.......

So the question is... have I killed it or has the master branch of git killed it...

also is there supposed to be both a citizen_count and a Citizen_Wrong page in the domestic advisor?
 
The screen shot is attached as a .rar
Please attach it as jpg next time. That way it can be viewed in the browser instead of download, extract and then open.

The resources bar has gone funny, it is all stretched and the numbers don't fit and wood appears to be missing!
Stretched is normal. I added another row of yields (from RaR) and next step is to only use it if there are enough yields to make make it useful. That turned out to be non-trivial to fix and it will likely be stretched for a while.

The missing lumber is odd though. I have to look into that. I just tested and it's the same for me (lucky you). I would be surprised if it turns out to be the domestic advisor cursing this as you get the problem without even calling that file. Then again if I alter the domestic advisor while the game is running, then the city screen is broken until I restart the game :confused:
 
Spice has also gone from the screen,

I am also mega rich, my second treasure has brought me to a total of over 6,000,000 gold.

here is the screen, I thought it would compress it more than it did..
 

Attachments

  • buggy city screen.jpg
    buggy city screen.jpg
    245.1 KB · Views: 59
Spice has also gone from the screen,
I will take a really close look later and go through them one by one. However I have a hunch what went wrong, but not where it happened.

I am also mega rich, my second treasure has brought me to a total of over 6,000,000 gold..
Can you supply a savegame from just before that happened? I would like to run that wealth through a debugger. Maybe I can make my own though.

EDIT: no need for a savegame. I just made one. It's "only" 1,700,000 though. I feel cheated :p
 
I will take a really close look later and go through them one by one. However I have a hunch what went wrong, but not where it happened.

Can you supply a savegame from just before that happened? I would like to run that wealth through a debugger. Maybe I can make my own though.

EDIT: no need for a savegame. I just made one. It's "only" 1,700,000 though. I feel cheated :p

These are both my bugs probably. I know the treasure one is mine. I am attempting to bring back the normal way to transport treasure for the Vikings empire and the 2071 mod. I actually forgot I was working on that part so it was never finished. I was working on updating the trade screens also so that goods you can't buy still show up, but with red letters and only shows the sell price and no buy price, so you can sell the goods but not buy them. All that was seemingly working but I didn't think to check the city screen, so I bet the new code I wrote is effecting it. I don't have the time at the moment to check this but can look at it later this evening.
 
I fixed the gold bug and pushed it. It tried to give gold to the player twice with one of the numbers being unset (read: being random). Try enough times and you would get 4 billion :lol:

That leaves the city screen bug. However I will not look into it right now. In fact Kailric appears to know the answer or at least when it broke. I will look forward to a fix as I will read the code. I'm still interested in splitting out the yield row code (or city code) and whatever you did appears to affect this greatly.
 
I fixed the gold bug and pushed it. It tried to give gold to the player twice with one of the numbers being unset (read: being random). Try enough times and you would get 4 billion :lol:

That leaves the city screen bug. However I will not look into it right now. In fact Kailric appears to know the answer or at least when it broke. I will look forward to a fix as I will read the code. I'm still interested in splitting out the yield row code (or city code) and whatever you did appears to affect this greatly.

Yeah, I think it would be easy perhaps to seperate the City code. The DLL and Python knows when gDLL->getInterfaceIFace()->isCityScreenUp(), so we should be able to determine what happens when the city screen is up. In CvMainInterface.py it does a if (CyInterface().isCityScreenUp()): to start the city screen code, we may can call our own code there.

Sorry about messing up your relaxing game:(
 
Back
Top Bottom